K
K
kappka2020-01-03 03:36:20
JavaScript
kappka, 2020-01-03 03:36:20

How to make Websocket work on HTTPS?

Hello.
Help, please, to understand. Studying the topic, I got confused.
Installed node.js, started the server. I connect via new WebSocket("ws://Server_IP:Port");
If SSL is disabled (that is, a site on http) - everything works fine.
If I enable SSL and change the connection to WebSocket("wss://IP_Server:Port") - I get an error.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2020-01-03
@Nc_Soft

Why is everyone trying to push SSL into the application? Use proxying through nginx and manage certificates there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question