Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions websocketproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down