Reverse proxy without default header modification

Hi! I want to reverse_proxy the traffic with their http headers intact. The documentation says:

By default, Caddy passes thru incoming headers to the backend—including the Host header—without modifications, with two exceptions:

I don’t want this default. Basically I don’t want to change any headers. How to do it?

1. Caddy version (caddy version):


2. How I run Caddy:

a. System environment:

ubuntu 18.04

b. Command:

systemctl start caddy

c. Service/unit/compose file:

d. My complete Caddyfile or JSON config:

:80 {
  reverse_proxy localhost:9000

3. The problem I’m having:

X-Forwarded-For and X-Forwarded-Proto headers are changed.

Want: no header changes.

6. Links to relevant resources:

Why would you need this though? Most apps require those headers to behave properly if they rely on needing to know the original client IP.

Please elaborate on what you’re trying to achieve, so we can best answer your question.

This topic was automatically closed after 30 days. New replies are no longer allowed.