If you run HomeAssistant behind a reverse proxy like treafik you will likely get the following error message:
2024-02-12 17:56:44.929 ERROR (MainThread) [homeassistant.components.http.forwarded] A request from a reverse proxy was received from 172.18.0.5, but your HTTP integration is not set-up for reverse proxies
To fix this, we need to change the homeassistant configuration.
Go into your configuration folder and edit configuration.yaml
. You need to add these parameters to the http
block.
http:
use_x_forwarded_for: true
trusted_proxies: 172.0.0.0/8
You can either define the ip of your reverse proxy or allow the whole subnet.
After that restart homeassistant and you should be able to login.