-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
nginx_proxy: Host header causes problems with ESPHome addon #3132
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
The problem is still happening, and a fix is already known - just one line. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
The problem is still happening |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I just checked and this still happens. This has been stalling for 4 months, affecting multiple addons and with a simple, single-line fix already proposed. Is there anything I can do to get it through? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Just checked again, and the issue keeps happening... |
I can confirm that #3356 fixes the log errors when connecting through the NGINX Proxy add-on with a non-default port. 🎉 Thanks! |
Describe the issue you are experiencing
As discussed here, when using the NGINX SSL Proxy addon together with the ESPHome addon, the websocket requests fail with this error:
Cross origin websockets not allowed
The reason is that the Origin and Host field differ, because the former includes the port, but the latter doesn't.
The fix would be very simple: on the default config, replace $host with $http_host, so it includes the port, on the
proxy_set_header Host
rule.I tried this fix and worked correctly for me, and didn't seem to break any of my other addons, but further testing would be nice.
I can send a PR if this fix looks reasonable.
What type of installation are you running?
Home Assistant Supervised
Which operating system are you running on?
Debian
Which add-on are you reporting an issue with?
NGINX Home Assistant SSL proxy
What is the version of the add-on?
3.5.0
Steps to reproduce the issue
System Health information
System Information
Home Assistant Community Store
Home Assistant Cloud
Home Assistant Supervisor
Dashboards
Recorder
Anything in the Supervisor logs that might be useful for us?
Anything in the add-on logs that might be useful for us?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: