Commit a0e6eb3b authored by Abiola Ibrahim's avatar Abiola Ibrahim

Merge pull request #855 from abiosoft/proxy-host-patch

Fix for #854
parents 238250e7 6e6d9e7e
...@@ -107,7 +107,7 @@ func (p Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) { ...@@ -107,7 +107,7 @@ func (p Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) {
outreq.Host = rHost outreq.Host = rHost
} }
if v, ok := host.UpstreamHeaders["Host"]; ok { 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 // Modify headers for request that will be sent to the upstream host
upHeaders := createHeadersByRules(host.UpstreamHeaders, r.Header, replacer) upHeaders := createHeadersByRules(host.UpstreamHeaders, r.Header, replacer)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment