SLL support in "useWebsockets" mode

Hi, I have page with https and I have the server with “useWebsockets” enabled.
For now I got error:
Mixed Content: The page at ‘https://*’ was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws:///’. This request has been blocked; this endpoint must be available over WSS.

If I add to my page this

I got error:
WebSocket connection to ‘wss://*********:8888/’ failed: Error in connection establishment: net::ERR_CONNECTION_CLOSED

Can I run server with “wss”?
Or how I can fix this?

Thank you.

For now I have certificate file and this certificate work fine on my Tomcat server.
How can I do the same thing on UNET server? I have only “useWebsockets” in my NetworkManager.

Any help would be much appreciated.

Maybe I can use llapi?
For example I have method NetworkTransport.AddWebsocketHost
But I cannot add certificate…
Is it not interesting? How do you add your games in social networks like facebook, vkontakte?

I used Nginx Websockets ssl proxy.

Thank you guys.

How did you connect the webgl client? I configured correctly the server behind a ssl proxy, but the webgl client still give me the “Uncaught SecurityError: Failed to construct ‘WebSocket’: An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.”

do u have an answer for wss from webgl client ?

1 Like