Cloudfare - reverseproxy - login attemp invalid from external

I cannot login into my home assistant web service , it always prompts with homeassistant.components.http.ban] Login attempt or request with invalid authentication

I have multiple containers:

  • Home-Assistant Core
  • Swag (letsencrypt) for reverse-proxy
  • others

I’ve been researching similar topic that suggest adding the reverse-proxy host or network in trusted networks sections. Since I did that, i can access my page, but no login.

The traffic goes : Cloudfare subdomain => xxxxx.duckdns.x ==>> swag(letsencrypt) => docker container

I’ve tried adding all Cloudfare ipv4s in trusted networks without success.

I also tried adding this in nginx.conf without success.

server {
location / {
#proxy_pass http://websocket;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”;



Also tied with :frowning:

use_x_forwarded_for: true
- # Add the IP address of the proxy server
ip_ban_enabled: false

login_attempts_threshold: 10


The same thing is happening to me too, I have an installation with duckdns and nginx and it works perfectly from inside the house but from outside it has stopped working