Fix wss in x-forwarded-proto
This commit is contained in:
parent
efcaf64a43
commit
e22c62baba
2 changed files with 12 additions and 1 deletions
|
@ -141,7 +141,7 @@ func (x *XForwarded) rewrite(outreq *http.Request) {
|
|||
}
|
||||
|
||||
if isWebsocketRequest(outreq) {
|
||||
if outreq.Header.Get(xForwardedProto) == "https" {
|
||||
if outreq.Header.Get(xForwardedProto) == "https" || outreq.Header.Get(xForwardedProto) == "wss" {
|
||||
outreq.Header.Set(xForwardedProto, "wss")
|
||||
} else {
|
||||
outreq.Header.Set(xForwardedProto, "ws")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue