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
感謝很多,它適用於我 –