Force http/1.1 for websocket
This commit is contained in:
parent
9c8df8b9ce
commit
afbad56012
5 changed files with 69 additions and 5 deletions
3
vendor/github.com/vulcand/oxy/forward/fwd.go
generated
vendored
3
vendor/github.com/vulcand/oxy/forward/fwd.go
generated
vendored
|
@ -264,7 +264,8 @@ func (f *websocketForwarder) serveHTTP(w http.ResponseWriter, req *http.Request,
|
|||
|
||||
dialer := websocket.DefaultDialer
|
||||
if outReq.URL.Scheme == "wss" && f.TLSClientConfig != nil {
|
||||
dialer.TLSClientConfig = f.TLSClientConfig
|
||||
dialer.TLSClientConfig = f.TLSClientConfig.Clone()
|
||||
dialer.TLSClientConfig.NextProtos = []string{"http/1.1"}
|
||||
}
|
||||
targetConn, resp, err := dialer.Dial(outReq.URL.String(), outReq.Header)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue