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:
parent
87c389f73d
commit
62622eb853
1 changed files with 1 additions and 0 deletions
|
@ -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}")
|
||||
|
|
Loading…
Reference in a new issue