HA app banning my IP address

I have a recurring issue with my mobile IP addresses getting blocked by IP ban. The scenario is the following:

  • i login into the HA Mobile Companion app in my home network, and everything is working fine
  • however when i move away from my home network (either on mobile data or connecting to some other Wifi APs) my app refuses to connect and i HA shows a persistent notification on IP ban.
  • the same happens on my wife’s phone
  • the ban is never caused by an incorrect login attempt where i would be entering my password into the app. The app is just trying to communicate with HA, should have a valid auth token but for some reason the HA server decides to ban it.

Here is an exceprt from my config.yaml. Note that i have added the cors section in an attempt to solve this issue, but it did not help. The problem appeared approx. a month ago and i am not aware of any configuration changes on my side that would have caused it. It seems like something on the way the app tries to renew the auth token changed.

I am accessing HA via my own domain with nginx reverse proxy and i don’t use HA cloud.

http:
  use_x_forwarded_for: true
  trusted_proxies:
    - 192.168.50.10
    - 172.18.0.0/24
  cors_allowed_origins:
    - https://homeassistant.****.***
    - https://192.168.50.10
    - http://192.168.50.10
  ip_ban_enabled: true
  login_attempts_threshold: 5