Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error during WebSocket handshake: 'Connection' header value must contain 'Upgrade' #61

Open
mozai opened this issue Sep 27, 2020 · 3 comments

Comments

@mozai
Copy link
Contributor

mozai commented Sep 27, 2020

Probably another quiet update to the websockets standard that will break stuff when Chrome+Firefox decides to be a hardass. Seeing this in the JS console

socket.io.js:8 WebSocket connection to 'wss://sync.wetfish.net/socket.io/?EIO=3&transport=websocket&sid={redacted}' failed: Error during WebSocket handshake: 'Connection' header value must contain 'Upgrade'

@Meleeman01
Copy link
Contributor

Meleeman01 commented Nov 10, 2020

https://www.serverlab.ca/tutorials/linux/web-servers-linux/how-to-proxy-wss-websockets-with-nginx/

i think the problem is due to the nginx configuration for ssl isn't proxy_passed, you should add proxy_ to the cert, key, and whatever else related to the ssl configuration i think. i looked over the server configuration you sent me and i think it might be solved by following that tutorial, however i'll need to test on my local with self signed cert, but if you want to now, you could try it.

EDIT: this might also be helpful, https://docs.nginx.com/nginx/admin-guide/security-controls/securing-http-traffic-upstream/

@mozai
Copy link
Contributor Author

mozai commented Nov 10, 2020

The nginx documentation says it can be 'upgrade' with a small 'u'
But the official RFC for websockets says it must be 'Upgrade' with a big 'U'

bleah, I shouldn't be surprised it's case-sensitive. This looks like a problem with nginx not sync; we can resolve this issue by adding set-up instructions in the readme.md. If this were a ticketing system I'd downgrade this to "minor."

@kelsh
Copy link

kelsh commented Nov 10, 2020

good work meleeman

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants