gpt4 book ai didi

javascript - 通过 SSL 混合内容

转载 作者:太空宇宙 更新时间:2023-11-03 15:12:39 25 4
gpt4 key购买 nike

我试图设置一个聊天脚本,但我收到混合内容错误,因为我安装了 SSL

Mixed Content: The page at '<URL>' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws:<URL>/websocket'. This request has been blocked; this endpoint must be available over WSS.

网站和聊天脚本托管在启用 SSL 的同一服务器上。

这是网址 https://afghanchat.net/client/htmlchat/1...hchat.html

最佳答案

WebSocket 安全模型不允许从安全资源(例如通过 HTTPS 提供的网页)访问不安全的 ws: URL。您必须改用 wss: URL。

错误消息提示 HTTPS 网页试图访问 ws: URL。

http: URL 用于不使用 SSL/TLS 访问的 HTTP 资源,https: URL 用于通过 SSL/TLS 访问的 HTTP 资源。与分别使用 ws:wss: URL 的 WebSocket 资源类似。

关于javascript - 通过 SSL 混合内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50855184/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com