diff --git a/middleware/proxy/reverseproxy.go b/middleware/proxy/reverseproxy.go index a49d1080..15350a99 100644 --- a/middleware/proxy/reverseproxy.go +++ b/middleware/proxy/reverseproxy.go @@ -147,7 +147,7 @@ func (p *ReverseProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request, extr } defer res.Body.Close() - if res.StatusCode == http.StatusSwitchingProtocols && outreq.Header.Get("Upgrade") == "websocket" { + if res.StatusCode == http.StatusSwitchingProtocols && res.Header.Get("Upgrade") == "websocket" { hj, ok := rw.(http.Hijacker) if !ok { return nil