【发布时间】:2018-10-28 11:36:36
【问题描述】:
我尝试在 Heroku 上部署 this application。当我在笔记本电脑上本地启动它时,它运行正常,但在 Heroku 上部署它以查看结果后,我遇到了一些问题:我可以在线看到应用程序的整个前端,但随机数没有动态显示在网页上。
我不知道如何调试它,因为在我的 Heroku 控制台上没有出现任何错误,所以我根本没有收到任何错误。有什么建议吗?
我的 procfile 如下所示:
web: gunicorn --worker-class eventlet -w 1 orig:app
编辑 1: 我打开我的谷歌浏览器控制台发现了这个:
Mixed Content: The page at 'https://fast-everglades-74376.herokuapp.com/' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://fast-everglades-74376.herokuapp.com/socket.io/?EIO=3&transport=websocket&sid=2e9895ef6415455eac51294746b3edf6'. This endpoint should be available via WSS. Insecure access is deprecated.
socket.io.min.js:1 POST http://fast-everglades-74376.herokuapp.com/socket.io/?EIO=3&transport=polling&t=1540729336006-41&sid=f550b39a0e1e4544b1eee0c3f1719871 400 (BAD REQUEST)
另外,在 Firefox 控制台上,我收到另一个关于混合活动内容的错误
编辑 2: 我将 Gunicorn 模块的版本从 19.3 更改为 18.0,之后我尝试在 http 而不是 https 上运行页面。在http上它似乎可以运行,问题是它现在不会在https上运行。
【问题讨论】:
标签: python heroku websocket socket.io