Anyone have any experience with azure linux VM running nginx? I have that setup and websockets are failing to connect:
WebSocket connection to 'wss://app.imendo.dk/hub?id=OD98sU782B4dSnrE51qkjA&access_token=...' failed:
Error: Failed to start the transport 'WebSockets': Error: WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.
Error: Server returned handshake error: Handshake was canceled.
Error: Connection disconnected with error 'Error: Server returned handshake error: Handshake was canceled.'.
Kinda scratching my head here.. is it some port i have to open or whats blocking it.. in my nginx settings i have forwarded the /hub to my .net 6 instance running on port 5100.
location /hub {
proxy_pass http://127.0.0.1:5100/hub;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
This same setup have worked on a server i got on a barebone server hosting platform (e.g. dedicated server) - so gotta be something in azure im missing :/