Hello,
I have followed the instructions over at External HTTP/S server to connect the websocket over https but I keep getting an error saying the connection to the websocket failed ERR_SSL_PROTOCOL_ERROR.
I'm using a self-signed certificate for localhost and the server and client use the same cert and key.
Is it possible to test ws with https on localhost or ws cannot recognize self-signed certificates?
Thank You!
Use the rejectUnauthorized option on the client, set it to false.
Hey @lpinca thank you for your help.
It turned out that the problem was I was setting a custom port WebSocket.Server({ server , port: 3005}).
It's strange cause with http custom ports work, anyway thanks again :smile:.
If you use the port option, a plain HTTP server is created and used internally. In your example the server option is ignored.