How do I use Trusted Proxy with NGINX on Docker?

I am trying to figure out how to configure the trusted proxy when using docker. I currently have an NGINX server running in front of HA. The NGINX reverse proxies back to the HA. The problem is since it is just a container the IP can change at the whim of Docker.

Can I use the container name or some other value instead of the IP?

1 Like

Same question… Watching

I am guessing I solved it with…

http:
  use_x_forwarded_for: true
  trusted_proxies:
    - 0.0.0.0/0

But I would like a more secure way to handle that