Authentication - Trusted networks

I have setup a local dns name for my home assistant instance (homeassistant.lan), which points to my reverse proxy (because different ports are open on the same server, including nginx addon, home assistant and more. I didn’t want to use ports to access my instances, so I use domain name filtering for this in the reverse proxy) and redirects to the ip home assistant (so ip of home assistant is also ip of nginx).
I have in the http component set the trusted_proxies to the ip of nginx and use_x_forwarded_for to true.
In the auth_providers I have added the whole IP range of my lan and also 127.0.0.1 (because reverse proxy is and home assistant run on same server, I don’t know is this was required)
My problem is that home assistant says homeassistant.lan is not on the whitelist of trusted networks.
What am I missing in my setup?