Skip to content

Commit

Permalink
Merge pull request #30 from ivankprod/wsproxy-headers-forward-issue
Browse files Browse the repository at this point in the history
Fix forward Cookie header in builtin func
  • Loading branch information
yeqown committed Dec 9, 2021
2 parents 65c03ce + cdf8fe9 commit bb0825f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ws_reverseproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func builtinForwardHeaderHandler(ctx *fasthttp.RequestCtx) (forwardHeader http.H
}

if cookie := ctx.Request.Header.Peek("Cookie"); string(cookie) != "" {
forwardHeader.Add("Sec-WebSocket-Protocol", string(cookie))
forwardHeader.Add("Cookie", string(cookie))
}

if string(ctx.Request.Host()) != "" {
Expand Down

0 comments on commit bb0825f

Please sign in to comment.