Since I have spent about 15 minutes today trying to figure out why my WebSockets are not updating in development, I have decided to put quick fix here, hopefully this will be useful.
Issue:

Let me help you!
Hey, I am Anatoly, founder of this blog. I would love to help you! I have 6+ years experience in Web Development and IT Leadership. Lets work together on your project! Leave me your email and I will schedule a FREE Consultation!
When I started ActionCable I got this error:
1 2 3 |
Request origin not allowed: http://0.0.0.0:3000 Failed to upgrade to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: websocket) Finished "/cable/" [WebSocket] for 127.0.0.1 at 2016-08-01 14:23:38 -0700 |
Solution:
- Go to
1development.rb - Add following line:
1config.action_cable.allowed_request_origins = ['http://0.0.0.0:3000'] - Restart Web Server
- Enjoy!
Click Subscribe to stay tuned for some cool Rails 5 ActionCable examples!
Cheers,
Anatoly
[…] have create separate post how to resolve it ,but for your convenience, I will repeat it […]
Thank you very much, exactly what I needed.
Great Job. You just saved my time