Mixed Content: The page at 'https://527.html' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://ip:2347/'. This request has been blocked; this endpoint must be available over WSS.
(anonymous) @ 527.html:97
Uncaught DOMException: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.
VM610:11 Uncaught DOMException: Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.
at <anonymous>:11:4
(anonymous) @ VM610:11
VM610:1 WebSocket connection to 'wss://127.0.0.1:8988/' failed:
VM676:11 Uncaught DOMException: Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.
VM676:3 频道初始化,接收消息: {"type":"init","client_id":"7f0000010b540000020d","user":"","message":"ok"}
服务端端口 2346 (配置了ssl)
服务端端口 2347
为啥子会有两个端口?
客户端连接的端口 2347
文档说了增加ssl的,把2346删了也是不行的!尝试过了
你先试一下 @Tinywan 说的,不配置ssl,使用ws连接是否可以
Mixed Content: The page at 'https://527.html' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://ip:2347/'. This request has been blocked; this endpoint must be available over WSS.
(anonymous) @ 527.html:97
Uncaught DOMException: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.
用ws就报这个错 然后根据文档搞了wss = =一开始用的是NGINX配置,不行我才改用方法1的
Nignx代理wss 或者其他云服务商的SLB代理wss 都是没有任何问题的。建议你使用Nginx代理
可以在线测试啊 有很多在线可以ws连接网站的 例如 这个就可以 https://www.qvdv.com/tools/qvdv-websocket.html
因为网站是https的 用ws直接报错、
别一根筋啊!浏览器控制台console,先测试一下是否是通的
VM610:11 Uncaught DOMException: Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.
at <anonymous>:11:4
(anonymous) @ VM610:11
VM610:1 WebSocket connection to 'wss://127.0.0.1:8988/' failed:
var ws = new WebSocket('ws://127.0.0.1:2346'); 这条可以 0.0
VM676:11 Uncaught DOMException: Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.
VM676:3 频道初始化,接收消息: {"type":"init","client_id":"7f0000010b540000020d","user":"","message":"ok"}
那就是证书配置问题了
都是直接按照文档的 他们说了两个方法都尝试过、一直连不上!
nginx代理
ssl_protocols TLSv1.1 TLSv1.2;
ssl_ciphers EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
目前配置是这样的!区别不是很大 0.0
我网站是多站点!这个修改是修改在站点配置还是直接修改公共的那个配置文件?目前我是在站点配置文件修改的
配置http或者server都行,能代理ws就行
搭车问一下,现在论坛可以删除自己的帖子了吗? 之前回复了一个人的问贴,别人回复后看不了原贴了 报 404
暂时没看到有删除方式
暂不支持删除
那为什么那个人的帖子被删除了
这个可能是官方删的!比如我这个帖子我都没看到哪里有删除方式!!这个页面没有 主页也没有
个人评论可以删除
哦哦 没有删除干净 我通知里还有那个帖子的回复通知