"SecurityError: Failed to construct 'WebSocket': An insecure WebSocket connection may not be init



我想用 Heroku 部署一个非常小的应用程序(React + Node 服务器(使用 Create-React-App 制作的,一切都在本地工作,但在生产环境中,我有这个错误消息:

SecurityError: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.

我不明白这个错误,因为我只有 React App + Node 服务器的样板,我没有使用 Web 套接字或任何东西,

我看到了一个有相同问题的主题(https://github.com/facebook/create-react-app/pull/8079#issuecomment-562373869(,但我仍然收到错误

我的 Github 存储库:https://github.com/Versifiction/ofilms-test-heroku

我的网站已部署:https://test-ofilms-heroku.herokuapp.com/

上述问题可能是由于为本地主机环境设置了代理目标而发生的。

在代码中找到代理目标 https://github.com/Versifiction/ofilms-test-heroku/blob/master/src/setupProxy.js

最新更新