【发布时间】:2021-07-09 10:37:29
【问题描述】:
我像正常的端口 3000 一样启动了 puma 服务器。在我的开发文件中,我有:
config.action_cable.url = "wss://xxxxxx.ngrok.io/cable"
config.action_cable.allowed_request_origins = [/http:\/\/*/, /https:\/\/*/]
但是,当我启动应用程序时,我在 Chrome 控制台中遇到了这个问题:
WebSocket connection to 'wss://xxxxxx.ngrok.io/cable' failed:
我也禁用了我的防火墙设置,但仍然遇到同样的问题。有没有通过 ngrok 访问 Action Cable 网络套接字的正确方法?
【问题讨论】:
标签: ruby-on-rails ruby websocket actioncable ngrok