We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7338eea commit d148ccbCopy full SHA for d148ccb
websocketproxy.go
@@ -48,11 +48,7 @@ type WebsocketProxy struct {
48
49
// ProxyHandler returns a new http.Handler interface that reverse proxies the
50
// request to the given target.
51
-func ProxyHandler(target *url.URL) http.Handler {
52
- return http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {
53
- NewProxy(target).ServeHTTP(rw, req)
54
- })
55
-}
+func ProxyHandler(target *url.URL) http.Handler { return NewProxy(target) }
56
57
// NewProxy returns a new Websocket reverse proxy that rewrites the
58
// URL's to the scheme, host and base path provider in target.
0 commit comments