I’m developing a multiplayer game with a WebGL client that connects to a linux headless server.
Using the UseWebsockets does the magic and alla works smooth until I load the game from an http connection.
To make it work over WSS I proxied the game using ngnix. Testing the connection using WebSocket Echo Server | WebSocket.org all works as expected on the server side. I proxied (e.g) the WS from the 7777 port to a secure 7778 port (with working SSL certificate)
but… if a load the webgl on a https connection Unity give me this error as soon as I try to connect to the 7778 secure port.
“Uncaught SecurityError: Failed to construct ‘WebSocket’: An insecure WebSocket connection may not be initiated from a page loaded over HTTPS”
What I’m expected to do on the webgl client side? How to configure it to use WSS instead of WS?