You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Document: reverse proxies must forward the original Host header #1276
Since 0.320.0 evcc rejects browser requests from foreign origins. A reverse proxy has to forward the original Host header including the port. So far this is only written down in the agent docs and in the advisory. It needs a place on docs.evcc.io.
Content
Requirement: the proxy forwards the Host header the browser sent, including the port.
Symptom: the UI loads but shows as offline. The log contains request Origin "…" is not authorized for Host "…". Over plain HTTP, changes fail as well with cross-origin request detected.
nginx port detail: $host drops the port, so a non-default port has to be added with $host:$server_port. $server_port is the port nginx listens on. If the browser uses a different one, for example behind a router port mapping, set it explicitly ($host:8443).
$http_host also works, but nginx advises against it, see this comment.
Home Assistant: ingress passes Host on unchanged. A reverse proxy in front of Home Assistant has to forward it as well.
Where
Main section: reference/web-ui or reference/configuration/uri (network, already mentions reverse proxies at externalUrl).
installation/home-assistant: short note with a link to the main section.
installation/freebsd: change the nginx example from $http_host to $host and link to the main section.
Activity