Skip to content

Commit

Permalink
make websockets respect ssl-insecure-skip-verify setting
Browse files Browse the repository at this point in the history
  • Loading branch information
yaroslavros authored and ploxiln committed May 6, 2020
1 parent d92bf82 commit 87f8fb2
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 87f8fb2

Please sign in to comment.