3

As the title mentions, I am unable to connect to deepstream server from a website which is served over HTTPS. I am able to connect it through local server though.

Initially I was getting following error:

deepstream.min.js:3 Mixed Content: The page at 'https://example.com' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://<deepstream-domain>:6020/deepstream'. This request has been blocked; this endpoint must be available over WSS.

After getting this error, I changed the connection string to wss://<deepstream-domain>.

But this throws following error:

WebSocket connection to 'wss://<deepstream-domain>:6020/deepstream' failed: Error in connection establishment: net::ERR_CONNECTION_CLOSED {"isTrusted":true}

Any idea how to solve this? Do I have to setup an SSL certificate in the deepstream server as well?

khushalbokadey
  • 1,132
  • 1
  • 11
  • 25
  • `example.com` is on nginx or what? You should route it through the same and then it would work. You will terminate the SSL at server and the forward it to `:6020` – Tarun Lalwani Apr 25 '18 at 09:05

1 Answers1

2

Fixed the problem by adding an SSL certificate to the domain and providing the SSL keys path in deepstream config.yml file.

khushalbokadey
  • 1,132
  • 1
  • 11
  • 25