mirror of
https://github.com/caddyserver/caddy.git
synced 2025-03-21 12:59:26 +01:00
parent
ea58d51907
commit
2153a81ec8
1 changed files with 18 additions and 21 deletions
|
@ -60,7 +60,6 @@ func init() {
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
//
|
|
||||||
func parseCaddyfile(h httpcaddyfile.Helper) ([]httpcaddyfile.ConfigValue, error) {
|
func parseCaddyfile(h httpcaddyfile.Helper) ([]httpcaddyfile.ConfigValue, error) {
|
||||||
if !h.Next() {
|
if !h.Next() {
|
||||||
return nil, h.ArgErr()
|
return nil, h.ArgErr()
|
||||||
|
@ -196,9 +195,7 @@ func parseCaddyfile(h httpcaddyfile.Helper) ([]httpcaddyfile.ConfigValue, error)
|
||||||
// need at least one handler in the routes for the response handling
|
// need at least one handler in the routes for the response handling
|
||||||
// logic in reverse_proxy to not skip this entry as empty.
|
// logic in reverse_proxy to not skip this entry as empty.
|
||||||
for from, to := range headersToCopy {
|
for from, to := range headersToCopy {
|
||||||
handler.Request.Set[to] = []string{
|
handler.Request.Set.Set(to, "{http.reverse_proxy.header."+http.CanonicalHeaderKey(from)+"}")
|
||||||
"{http.reverse_proxy.header." + from + "}",
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
goodResponseHandler.Routes = append(
|
goodResponseHandler.Routes = append(
|
||||||
|
|
Loading…
Reference in a new issue