From eb00f8e625b27f3193a204deec68337d9ba7307f Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Mon, 4 Apr 2016 03:05:50 +0200 Subject: Add path --- ws.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ws.go b/ws.go index 5d90254..b54c2ce 100644 --- a/ws.go +++ b/ws.go @@ -5,6 +5,7 @@ import ( "net" "net/http" "net/url" + "path" ) type WebSocketProxy struct { @@ -54,6 +55,7 @@ func NewWebSocketProxy(target *url.URL) *WebSocketProxy { director := func(req *http.Request) { req.URL.Scheme = target.Scheme req.URL.Host = target.Host + req.URL.Path = path.Join(target.Path, req.URL.Path) } return &WebSocketProxy{Director: director} } -- cgit v1.2.3