C
C
Chainsaw21002022-01-13 20:01:03
Django
Chainsaw2100, 2022-01-13 20:01:03

Why won't browsers connect to wss?

I'm making a WebRTC video chat with JS and Django.
There was a need for HTTPS.
I don't know much about this, so I need help.
The script says to use ws for http, and wss for https. When I run https through ngrok, everything works.
But these aren't real certificates, are they?
According to this instruction , I installed self-signed certificates, I run it, but Firefox returns:

Firefox cannot connect to wss server

Chrome:
WebSocket connection to ' wss://127.0.0.1:8000/ ' failed:
WebSocket is already in CLOSING or CLOSED state.

Good. It says here that you need to accept the certificate as an exception, then everything is OK, but it did not help me. I read that this happens with self-signed ones, we need normal ones from LetsEncrypt.
I deployed the project according to these instructions, made normal certificates, but still errors.
I understand that I am doing something wrong, but I do not understand what exactly.

Hmm, for some reason it doesn't even connect to ws.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question