Disable websocket compression
This commit is contained in:
parent
d8297a055a
commit
d7b513e9aa
2 changed files with 1 additions and 5 deletions
2
Gopkg.lock
generated
2
Gopkg.lock
generated
|
@ -1027,7 +1027,7 @@
|
||||||
"roundrobin",
|
"roundrobin",
|
||||||
"utils"
|
"utils"
|
||||||
]
|
]
|
||||||
revision = "fd0f370c961f6aa304379f4106e76ffe5ed7e97a"
|
revision = "fd6f71c694e2ab8b584c50b98ab4825027feb315"
|
||||||
source = "https://github.com/containous/oxy.git"
|
source = "https://github.com/containous/oxy.git"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
|
|
4
vendor/github.com/vulcand/oxy/forward/fwd.go
generated
vendored
4
vendor/github.com/vulcand/oxy/forward/fwd.go
generated
vendored
|
@ -283,8 +283,6 @@ func (f *httpForwarder) serveWebSocket(w http.ResponseWriter, req *http.Request,
|
||||||
|
|
||||||
dialer := websocket.DefaultDialer
|
dialer := websocket.DefaultDialer
|
||||||
|
|
||||||
dialer.EnableCompression = strings.Contains(req.Header.Get("Sec-Websocket-Extensions"), "permessage-deflate")
|
|
||||||
|
|
||||||
if outReq.URL.Scheme == "wss" && f.tlsClientConfig != nil {
|
if outReq.URL.Scheme == "wss" && f.tlsClientConfig != nil {
|
||||||
dialer.TLSClientConfig = f.tlsClientConfig.Clone()
|
dialer.TLSClientConfig = f.tlsClientConfig.Clone()
|
||||||
// WebSocket is only in http/1.1
|
// WebSocket is only in http/1.1
|
||||||
|
@ -326,8 +324,6 @@ func (f *httpForwarder) serveWebSocket(w http.ResponseWriter, req *http.Request,
|
||||||
return true
|
return true
|
||||||
}}
|
}}
|
||||||
|
|
||||||
upgrader.EnableCompression = strings.Contains(resp.Header.Get("Sec-Websocket-Extensions"), "permessage-deflate")
|
|
||||||
|
|
||||||
utils.RemoveHeaders(resp.Header, WebsocketUpgradeHeaders...)
|
utils.RemoveHeaders(resp.Header, WebsocketUpgradeHeaders...)
|
||||||
|
|
||||||
underlyingConn, err := upgrader.Upgrade(w, req, resp.Header)
|
underlyingConn, err := upgrader.Upgrade(w, req, resp.Header)
|
||||||
|
|
Loading…
Reference in a new issue