How do you remove X-Forwarded-For from a proxied request?

I am trying to setup a personal mirror for a website that I cannot access on my current network.

  1. Is it possible to not set X-Forwarded-For (to create a transparent proxy)
  2. is it possible to rewrite URLs in the site content?

I have tried using

          Host: ""
          X-Forwarded-For: ""

but am finding X-Forwarded-For are still sent in the proxied request

Hi @kmaid, thanks for your interest in Traefik!

Did you see already Cannot remove X-Forwarded-For · Issue #5482 · traefik/traefik · GitHub ?

Hey @svx!

Yes I saw this github issue. The suggestions did not resolve my problem or atleast from the responses the person who raised the issue.

I tried using

      insecure: true


      insecure: true

However neither seemed to have any effect on headers sent by Traefik to the website in question. The documentation doesn't make it clear what these flags do.

I also tried ipWhitelisting all IPs and setting my personal IP as an excludedIPs which according to the example table "Example of ExcludedIPs & X-Forwarded-For" should have removed the header but instead caused a Forbidden Error message.

Hi @kmaid,
can post your Traefik config and you run Traefik in DEBUG mode and post the logs?