Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to connect to deepstream server from website over HTTPS

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?

like image 272
khushalbokadey Avatar asked May 19 '26 02:05

khushalbokadey


1 Answers

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

like image 167
khushalbokadey Avatar answered May 22 '26 00:05

khushalbokadey



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!