Websocket secure (wss) hosting

Hello, I have a node.js server hosting a Websocket server that uses uWebSockets.js (GitHub - uNetworking/uWebSockets.js: μWebSockets for Node.js back-ends).
I am trying to connect to it on a C# client, but getting this error:
“Request Finished Successfully, but the server sent an error. Status Code: 520-Origin”.

Some FYI:

  • I am using this endpoint to connect on the client: “wss://trivia-party-game-room.onrender.com”
  • I am using a paid tier, so I assume it’s not something related to other websockets issues.
  • I am using a self signed certificate to open my websocket server

Thanks in advance!

Okay, I got it to work by doing this:

  • Instead of opening the socket with the secure option (wss with self-signed certificates), open a non-secure socket with no certificates whatsoever

  • Keep connecting to the endpoint using “wss”, even though I didn’t technically created a wss server.

I guess that as websockets start by sending an https request first, things just work

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.