From 6e6d9e7e9ebc2acbc89550f3bc6375c7f38c1a5b Mon Sep 17 00:00:00 2001 From: Abiola Ibrahim Date: Sun, 29 May 2016 07:51:24 +0100 Subject: [PATCH] Fix for #854 --- middleware/proxy/proxy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/middleware/proxy/proxy.go b/middleware/proxy/proxy.go index 6ce51192..b7b6c327 100644 --- a/middleware/proxy/proxy.go +++ b/middleware/proxy/proxy.go @@ -107,7 +107,7 @@ func (p Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) { outreq.Host = rHost } if v, ok := host.UpstreamHeaders["Host"]; ok { - r.Host = replacer.Replace(v[len(v)-1]) + outreq.Host = replacer.Replace(v[len(v)-1]) } // Modify headers for request that will be sent to the upstream host upHeaders := createHeadersByRules(host.UpstreamHeaders, r.Header, replacer)