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

Add WebSocket support to hidden proxy feature in www/custom.yaml #1956

Open
eslindsey opened this issue Apr 4, 2021 · 2 comments · May be fixed by #2385
Open

Add WebSocket support to hidden proxy feature in www/custom.yaml #1956

eslindsey opened this issue Apr 4, 2021 · 2 comments · May be fixed by #2385

Comments

@eslindsey
Copy link

eslindsey commented Apr 4, 2021

Proxy support (using www/custom.yaml) is a hidden feature in Mail-in-a-Box which I truly appreciate. However, many of the services I write nowadays use WebSockets, and the proxy support configuration lines added by Mail-in-a-Box do not support this. I've tested and confirmed that it is easy to add WebSocket proxy support using the following extra configuration parameters in the volatile file /etc/nginx/conf.d/local.conf:

# added for WebSocket support; see https://www.nginx.com/blog/websocket-nginx/
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;

So, I will find a way to extend the www/custom.yaml support to add a parameter or option to indicate that a particular proxy directive should include support for WebSockets, and if so will include these extra configuration lines. I will be happy to submit a pull request with my changes, if others would find this functionality useful.

@DreamTexX
Copy link

Please add websocket support!

JJJ added a commit to JJJ/mailinabox that referenced this issue Apr 21, 2024
@JJJ JJJ linked a pull request Apr 21, 2024 that will close this issue
@JJJ
Copy link
Contributor

JJJ commented Apr 23, 2024

Please add websocket support!

I submitted a pull request for this, and am running it live on my own fork.

Hopefully this feature lands in a future version, soon!

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

Successfully merging a pull request may close this issue.

3 participants