diff --git a/config.go b/config.go index 8eb9c3b..fd327ad 100644 --- a/config.go +++ b/config.go @@ -29,7 +29,7 @@ func newLocation(config Config) *location { base: config.Base, headers: headers{ scheme: "X-Forwarded-Proto", - host: "X-Forwarded-For", + host: "X-Forwarded-Host", }, } } diff --git a/location_test.go b/location_test.go index 757af98..eabd6f5 100644 --- a/location_test.go +++ b/location_test.go @@ -49,7 +49,7 @@ var tests = []struct { req: &http.Request{ Header: http.Header{ "X-Forwarded-Proto": {"https"}, - "X-Forwarded-For": {"bar.com"}, + "X-Forwarded-Host": {"bar.com"}, }, URL: &url.URL{}, },