I'm running Traefik v2.4.8 (Docker) and have a number of File Providers configured to provide reverse proxy to URLs on external hosts on the same LAN. These file providers work great for all but one of the external hosts where I get lots of 403 Forbidden errors when I try to navigate exthost.DOMAIN and the website doesn't render correctly in the browser...
The following is the dynamic file provider app-external-host.yml configuration used for this external-host service:
http: routers: external-host-rtr: rule: "HostHeader(`exthost.DOMAIN`)" entryPoints: - https middlewares: - chain-no-auth service: external-host-svc tls: certResolver: dns-cloudflare services: external-host-svc: loadBalancer: servers: - url: "https://192.168.0.253:443" # external-host (Internal URL)
I see the exact same 403 Forbidden issues if I use nginx as the Reverse Proxy in front of this same external-host service but, with nginx, I can solve the problem and all works by simply setting the following "Referer" Host Header:
proxy_set_header Referer "https://192.168.0.253";
So, how do I set the similar "Referer" header for this external-host service in Traefik?