1
我正在使用后端框架Ruby on Rails 5,实际上是用于websocket连接的动作电缆以及作为前端Android。我在https://github.com/rails/actioncable-examples中为客户端连接使用库https://github.com/hosopy/actioncable-client-java创建服务器。当我连接到服务器时,它每一次失败,出现异常:ActionCable(Rails5)和Android客户端
Started GET "/cable" for 192.168.0.106 at 2017-06-15 17:57:19 +0500
Cannot render console from 192.168.0.106! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Started GET "/cable/" [WebSocket] for 192.168.0.106 at 2017-06-15 17:57:19 +0500
Request origin not allowed:
Failed to upgrade to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: websocket)
Finished "/cable/" [WebSocket] for 192.168.0.106 at 2017-06-15 17:57:19 +0500
有什么问题,有什么我做错了吗?
检查https://stackoverflow.com/questions/35188892/request-origin-not-allowed-http-localhost3001-when-using-rails5-and-actionca – yzalavin
感谢很多,它适用于我 –