正如标题所提到的,我无法从通过HTTPS提供的网站连接到deepstream服务器。我可以通过本地服务器连接它。
最初我收到了以下错误:
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.
收到此错误后,我将连接字符串更改为wss://<deepstream-domain>
。
但这引发了以下错误:
WebSocket connection to 'wss://<deepstream-domain>:6020/deepstream' failed: Error in connection establishment: net::ERR_CONNECTION_CLOSED
{"isTrusted":true}
知道如何解决这个问题吗?我是否还必须在深度服务器中设置SSL证书?
答案 0 :(得分:2)
通过向域添加SSL证书并在深层config.yml
文件中提供SSL密钥路径来解决此问题。