0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-23 22:27:38 -05:00

proxy: 'transparent' also sets X-Forwarded-For (closes #924)

This commit is contained in:
Matthew Holt 2016-07-09 17:33:27 -06:00
parent 87c389f73d
commit 62622eb853

View file

@ -289,6 +289,7 @@ func parseBlock(c *caddyfile.Dispenser, u *staticUpstream) error {
case "transparent":
u.upstreamHeaders.Add("Host", "{host}")
u.upstreamHeaders.Add("X-Real-IP", "{remote}")
u.upstreamHeaders.Add("X-Forwarded-For", "{remote}")
u.upstreamHeaders.Add("X-Forwarded-Proto", "{scheme}")
case "websocket":
u.upstreamHeaders.Add("Connection", "{>Connection}")