ThomDietrich / home-assistant-addons

AutoSSH Home Assistant Addon - alternative to cloud or VPN: Permanent port forwarding
MIT License
32 stars 18 forks source link

400: Bad Request when trying to access HA from remote server (solved) #3

Closed filipiff closed 8 months ago

filipiff commented 2 years ago

I put this info just for reference because I already solved the problem.

On my setup I use on remote server a docker container with the "linuxserver/openssh-server:latest" image and Traefik as a reverse proxy server to serve the internal http service to a public URL like https://homeassistant.mydomain.com.

My local HA instance is on a Raspberry Pi 3 with hass. The IP was set by dynamic IP from the internal router DHCP.

After the first installation & configuration everything was working perfectly, but some days later I began to get those "400: Bad Request" errors when trying to access my public HA address.

I discovered then that my local HA has changed his IP address and that this change wasn't reflected in the configuration.yaml on the [http] section, variable "trusted_proxies".

Replacing the IP with the new one, did solved the problem.

Maybe on the documentation should be mentioned that there is also this "trusted proxy" configuration setting in configuration.yaml

iosoft commented 2 years ago

I am facing the same issue. https://e3606f60fce574.lhrtunnel.link/

What should be the "trusted proxy" value?

ThomDietrich commented 2 years ago

Hey! This trusted proxy thing was introduced a few months ago and I just couldn't find the 10min to document this... 😅 Any volunteers to propose a few words for README or DOCS?