Fix proxy for websocket with altered Host header

This commit is contained in:
Luit van Drongelen 2015-11-21 20:00:44 +01:00
parent 4dbb4274d9
commit f0b1edaf8c

View File

@ -169,7 +169,7 @@ func (p *ReverseProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request, extr
} }
defer conn.Close() defer conn.Close()
backendConn, err := net.Dial("tcp", outreq.Host) backendConn, err := net.Dial("tcp", outreq.URL.Host)
if err != nil { if err != nil {
return err return err
} }