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

issue/1956: Add custom.yaml support for WebSockets #2385

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JJJ
Copy link
Contributor

@JJJ JJJ commented Apr 21, 2024

Fixes #1956.

@JJJ
Copy link
Contributor Author

JJJ commented Apr 21, 2024

For context, I'm running HomeAssistant behind Mail-in-a-Box's reverse proxy via custom.yaml. It uses the WebSockets API (hence wss:// URI's & persistent connections), and nginx needs to know that it is allowed to automatically attempt to "upgrade" HTTP connections to sockets.


One caveat that I am uncertain about (and hence left alone) is nginx's Host header setting, and how that intersects with MIAB's pass-http-host flag:

  • pass-http-host will set Host to $http_host, but...
  • nginx suggests using $host

I suspect most devs expect that the values of these 2 variables are the same, but in actuality one value is derived from the other and potentially modified by nginx (meaning, they're usually equal, but that is not a guarantee).

Ultimately, I chose not to modify the existing flag, with the assumption that if this PR works OK for me with HomeAssistant, it is likely to work for others with similar needs.

TY for your consideration @JoshData & contributors 🫶

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 this pull request may close these issues.

Add WebSocket support to hidden proxy feature in www/custom.yaml
1 participant