Joplin server w/nginx setup with one problem

You won't be able to access joplin both via external and via internal ip (both is also possible, but that's another topic). Your goal should be that joplin is accessible from external but not from internal.

This implies that the APP_BASE_URL has to be the public url. The variable is for the server, so that it knows where to redirect, fetch the resources etc. If this would be the internal address those references to local ips wouldn't work from external.

In your first post you stated, you had already tested the server standalone, right? So APP_BASE_URL set to http://192.168.254.31:22300 and then accessing the server via that http://192.168.254.31:22300. If so, then it's almost certainly the fault of nginx. I didn't use nginx to this point, so I can't really support you with that...

Is the joplin server log saying anything interesting when you are getting the invalid origin error?

The solution you linked doesn't look very trustworthy from my perspective, but if it works for him, it's fine, I guess...

Just a reassurence: The server_name url (joplin.mysubdom.familyds.net) and the urls you are using elsewhere (https://joplin.yadda.familyds.net, joplin.mysubdom.synology.com) are the same, correct?