websocket
websocket copied to clipboard
[BUG] Chat example does not work
Is there an existing issue for this?
- [x] I have searched the existing issues
Current Behavior
Chat example does not work because the upgrader does not implement the CheckOrigin
fix for the demo: https://github.com/jloic/websocket/commit/bf7d582703e3a01ce2cb3345e050ba793db83ea3
Expected Behavior
No response
Steps To Reproduce
No response
Anything else?
No response
The chat example works as is.
Because the home page is served from the same origin as the websocket endpoint, the default origin check logic allows the connection to go through.
Edit: OP suggests that the example disable origin checks. It's a bad idea to demonstration a disabled origin check in the examples because disabled origin checks are a security vulnerability in most application scenarios.