From 62622eb8536a3369d63772bae22047e4a72395f1 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Sat, 9 Jul 2016 17:33:27 -0600 Subject: [PATCH] proxy: 'transparent' also sets X-Forwarded-For (closes #924) --- caddyhttp/proxy/upstream.go | 1 + 1 file changed, 1 insertion(+) diff --git a/caddyhttp/proxy/upstream.go b/caddyhttp/proxy/upstream.go index 1a45ff70..64f8c551 100644 --- a/caddyhttp/proxy/upstream.go +++ b/caddyhttp/proxy/upstream.go @@ -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}")