Hacker News new | ask | show | jobs
by mwpmaybe 3451 days ago
I think you want header_upstream instead of proxy_header, at least in newer versions of Caddy, and the transparent[0] preset sets Host, X-Forwarded-For, and X-Forwarded-Proto for you!

  proxy / 127.0.0.1:8080 {
    except /favicon.ico /robots.txt /assets /plainpages /staticstuff /test1
    transparent
  }
0. https://caddyserver.com/docs/proxy
1 comments

Thanks! I didn't notice transparent. I added the proxy_header based on documented requirements of the 2nd server.