部署到产品时出现 VueJS 错误: DOMException: "The operation is insecure."



我已经部署了我的 VueJS 应用程序来网络化。我的应用程序在本地计算机上运行良好,并且生产部署在Chrome中运行,但是当您点击"连接"时,Firefox会给出以下错误。

这是尝试通过 websocket 连接到 MQTT 代理。

DOMException: "The operation is insecure."

您可以在此处查看一个工作示例:

https://inspiring-beaver-f90fa7.netlify.com/

我想通了。

Firefox 阻止从 https 到不安全的 websockets 的连接(ws://或 mqtt://(

在这种情况下,我需要切换到安全的经纪人(wss://(,一切正常。

或者,你可以强制Firefox允许这个连接,方法是转到firefox的about:config并切换network.websocket.allowInsecureFromHTTPS将摆脱SecurityError。记录在这里: 火狐浏览器网页套接字安全问题

相关内容

最新更新