Skip to content

Commit

Permalink
Merge pull request #47 from ploxiln/insecure_wss
Browse files Browse the repository at this point in the history
make websockets respect ssl-insecure-skip-verify setting
  • Loading branch information
ploxiln authored May 6, 2020
2 parents d92bf82 + 87f8fb2 commit 9438468
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions oauthproxy.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"crypto/tls"
b64 "encoding/base64"
"errors"
"fmt"
Expand Down Expand Up @@ -139,6 +140,9 @@ func NewWebSocketOrRestReverseProxy(u *url.URL, opts *Options, auth hmacauth.Hma
wsScheme := "ws" + strings.TrimPrefix(u.Scheme, "http")
wsURL := &url.URL{Scheme: wsScheme, Host: u.Host}
wsProxy = wsutil.NewSingleHostReverseProxy(wsURL)
if opts.SSLInsecureSkipVerify {
wsProxy.TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
}
}
return &UpstreamProxy{u.Host, proxy, wsProxy, auth}
}
Expand Down

0 comments on commit 9438468

Please sign in to comment.