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
Make web sockets work behind port forwarding #42
Comments
Hi, we've been migrating from apache to nginx on our production machine. We've had the same issue, and it is now patched in the |
I had a look at the soon branch and it looks like it will solve the problem. Thank you! |
But what was the issue! |
The server used to try to infer the URI for the websocket. Now you explicitly set the value in your config.js file. |
Thanks :) |
I'm trying to set up cryptpad (listening at http and websocket on port 3000) behind a nginx reverse proxy that forwards requests sent to e.g. mycryptpad.example.com:80 to 192.168.0.1:3000
It works for static web content.
However, when the web client performs a GET on /api/config, it is told to open a websocket to ws://mycryptpad.example.com:3000, but it should be 80
The relevant code is at server.js line 55
This is hard to rewrite in reverse proxy configuration.
Could you add in config.js an optional parameter with the port to be shown to web clients in case it's different to the listening port?
Thanks so much for your work!
The text was updated successfully, but these errors were encountered: