ESP8266 WebSocket Unexpected response code: 200

Hi everyone,

I've implemented websockets into my ESP8266 project.
It works fine as long as I access the device via it's local IP. However if I use DDNS, the Websockets don't work. The Chrome console shows:

WebSocket connection to 'ws://' failed: Error during WebSocket handshake: Unexpected response code: 200

The DDNS is handled by a NGINX proxy manager running on my Synology NAS. Websockets are enabled. Disabling/reenabling it doesn't change anything. Also I am confused by the error code. 200 usually means the connection is OK, right?
It's worth mentioning that I earlier used the async websockets integrated in the ESPAsyncWebServer and did not have this issue there. I stopped using the async library as it messed with my Serial commucation.

I haven't been able to find much info regarding this issue. Maybe someone here knows how to tackle the issue.
I'd prefer to be able to access the device by it's DDNS if possible.

All help appreciated!


Allright so I just realized what the issue is. The DDNS name in my NGINX manager forwards to port 80.
The async socket server which I previously used runs on port 80, but ads a suffix /ws.
This (sync) socket server runs on port 81, thus the issue.