diff --git a/websocketproxy.go b/websocketproxy.go index 63d39ba..9961dad 100644 --- a/websocketproxy.go +++ b/websocketproxy.go @@ -165,6 +165,9 @@ func (w *WebsocketProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request) { if hdr := resp.Header.Get("Set-Cookie"); hdr != "" { upgradeHeader.Set("Set-Cookie", hdr) } + if hdr := resp.Header.Get("Sec-Websocket-Accept"); hdr != "" { + upgradeHeader.Set("Sec-Websocket-Accept", hdr) + } // Now upgrade the existing incoming request to a WebSocket connection. // Also pass the header that we gathered from the Dial handshake.