mirror of https://github.com/caddyserver/caddy.git
Revert "reverse_proxy: Add 'transparent' Caddyfile subdirective (closes #2873)"
This reverts commit 86b785e51c
.
This commit is contained in:
parent
86b785e51c
commit
e2d41ee761
|
@ -411,21 +411,6 @@ func (h *Handler) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
|
|||
}
|
||||
h.TransportRaw = caddyconfig.JSONModuleObject(rt, "protocol", name, nil)
|
||||
|
||||
case "transparent":
|
||||
if d.NextArg() {
|
||||
return d.ArgErr()
|
||||
}
|
||||
if h.Headers == nil {
|
||||
h.Headers = new(headers.Handler)
|
||||
}
|
||||
if h.Headers.Request == nil {
|
||||
h.Headers.Request = new(headers.HeaderOps)
|
||||
}
|
||||
// The X-Forwarded-For header is always appended to by default, directly in the reverse proxy code
|
||||
headers.CaddyfileHeaderOp(h.Headers.Request, "Host", "{http.request.hostport}", "")
|
||||
headers.CaddyfileHeaderOp(h.Headers.Request, "X-Real-Ip", "{http.request.remote}", "")
|
||||
headers.CaddyfileHeaderOp(h.Headers.Request, "X-Forwarded-Proto", "{http.request.scheme}", "")
|
||||
|
||||
default:
|
||||
return d.Errf("unrecognized subdirective %s", d.Val())
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue