mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-06-04 22:57:20 +02:00
Merge pull request #168 from nettybun/issue-164-http-host-header
Use correct Host HTTP header
This commit is contained in:
commit
6feb2d105d
@ -346,11 +346,8 @@ func (p *ReverseProxy) ProxyHTTP(rw http.ResponseWriter, req *http.Request, rrr
|
|||||||
p.Director(outreq)
|
p.Director(outreq)
|
||||||
outreq.Close = false
|
outreq.Close = false
|
||||||
|
|
||||||
if !rrr.UseTLS {
|
// Always use the original host, see issue #164
|
||||||
//This seems to be routing to external sites
|
outreq.Host = rrr.OriginalHost
|
||||||
//Do not keep the original host
|
|
||||||
outreq.Host = rrr.OriginalHost
|
|
||||||
}
|
|
||||||
|
|
||||||
// We may modify the header (shallow copied above), so we only copy it.
|
// We may modify the header (shallow copied above), so we only copy it.
|
||||||
outreq.Header = make(http.Header)
|
outreq.Header = make(http.Header)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user