Sinds a couple of days i get this error: 400: Bad Request when i browse to my home assistant.
When i look into the Nginx log it gives me this error:
2021/07/08 19:57:46 [error] 220#220: *1 connect() failed (111: Connection refused) while connecting to upstream, client: xx.xx.xx.xx, server: xxxxx.duckdns.org, request: "GET /favicon.ico HTTP/2.0", upstream: "http://xx.xx.xx.xx:8123/favicon.ico", host: "merkelbeek.duckdns.org", referrer: "https://xxxxx.duckdns.org/"
What can i do to fix this?
Hellis81
(Hellis81)
2
Latest version has a breaking change.
Could that be it?
Was it since yesterday and have you updated?
Maybe it’s longer but i found out yesterday,
Do you mean update of duckdns or nginx or homeassist itself?
Hellis81
(Hellis81)
4
Version 2021.7.0 has a breaking change. I believe it’s the first one listed that refers to remote access.
I tried version 2021.7.0 and 2121.7.1
What modification must i make to get it accesible from external?
Have you checked the breaking changes?
Nick4
(Nick)
8
So if i am correct i need to put this code in my configuration.yaml
http:
# ssl_certificate: /ssl/fullchain.pem
# ssl_key: /ssl/privkey.pem
use_x_forwarded_for: true
trusted_proxies:
- 172.30.33.0/24
ip_ban_enabled: true
login_attempts_threshold: 5
which ip do i need to enter in here? my HA is running on 192.168.2.250
Nick4
(Nick)
10
No, it’s not the IP of your HA box but from the proxy server that intercepts your request for a connection and forwards it to the HA server.
I’m not sure but I think NGINX always runs on that IP address by default.
Just give it a try and you will know very soon.
I fixed it by placing below code in my configuration.yaml
http:
# ssl_certificate: /ssl/fullchain.pem
# ssl_key: /ssl/privkey.pem
use_x_forwarded_for: true
trusted_proxies:
- 172.30.33.0/24
5 Likes
you can get the correct ip address to use from the ha log file.
eg. "A request from a reverse proxy was received from 172.18.0.4, but your HTTP integration is not set-up for reverse proxies"
2 Likes