Trusted Networks: Login Aborted (using reverse proxy)


After upgrading from 2021.03 to 2021.10.05, I’ve been having issues with logging in to Home Assistant using trusted networks.

Screenshot 2021-10-22 104829

I’ve followed suggestions from below topics, but to no avail.

You can find my configuration below:


ip_ban_enabled: False
login_attempts_threshold: 10
use_x_forwarded_for: true
  - # gateway
  - # proxy
  - # external IP (dynamic)


- type: trusted_networks
  allow_bypass_login: true
    - # external IP (dynamic)
- type: homeassistant


    location / {
                proxy_set_header Host $host;
                proxy_redirect off;
                proxy_http_version 1.1;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";

Been debugging some more. No luck so far.
I changed the nginx settings slightly to better resemble the working config here.

I do wonder; should I be able to see the X-Forwarded-For headers in Developer Tools? Or are those only visible to the Home Assistant server (since the request is being passed through from the reverse proxy)?

any solution so far? have the same issue…

Nothing yet unfortunately…
I’ve reverted to password login for now.

haha… me too

funny… now I got it working

just removed the localhost entries from the trusted proxis… I only have one entry here (because I use the nginx manger addon)

    -            # .32.0/24 and .33.0/24 - Docker subnet

and finally the trusted networks are working :slight_smile: HTH