Answer the question
In order to leave comments, you need to log in
How to migrate from ws to wss?
On the client side, there is a js script that uses websocket (ws). There is a php daemon on the server side, which is a websocket server (listens on "tcp://0.0.0.0:8080"). The site has been switched from http to https, respectively, you need to switch to wss, otherwise the error will occur: The page at ' https://website ' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://server:8080 /'. This request has been blocked; this endpoint must be available over WSS.
Is it possible to make the transition "with little bloodshed" by correcting handshake / replacing tcp with ssl / adding the right one, or is it easier to use Ratchet or other libraries?
Answer the question
In order to leave comments, you need to log in
The simplest thing is to terminate tls / ssl on some nginx, and then proxy requests to where they were processed. More details can be found in the nginx documentation: https://nginx.ru/ru/docs/http/websocket.html
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question