From f0b1edaf8c118407793bc7efda3fc00409023836 Mon Sep 17 00:00:00 2001 From: Luit van Drongelen Date: Sat, 21 Nov 2015 20:00:44 +0100 Subject: [PATCH] Fix proxy for websocket with altered Host header --- middleware/proxy/reverseproxy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/middleware/proxy/reverseproxy.go b/middleware/proxy/reverseproxy.go index e5652fa91..f9da992ec 100644 --- a/middleware/proxy/reverseproxy.go +++ b/middleware/proxy/reverseproxy.go @@ -169,7 +169,7 @@ func (p *ReverseProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request, extr } defer conn.Close() - backendConn, err := net.Dial("tcp", outreq.Host) + backendConn, err := net.Dial("tcp", outreq.URL.Host) if err != nil { return err }