Skip to content

Commit

Permalink
feat(ssl): allow invalid / untrusted ssl certs on proxy targets #7
Browse files Browse the repository at this point in the history
  • Loading branch information
mefellows committed Mar 2, 2017
1 parent 33d6b3f commit 529da81
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion protocol/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type HTTPProxy struct {
ProxyHost string `required:"true" mapstructure:"proxy_host"`
ProxyPort int `required:"true" mapstructure:"proxy_port"`
ProxyProtocol string `required:"true" default:"http" mapstructure:"proxy_protocol"`
Insecure bool `required:"true" default:"false" mapstructure:"insecure"`
middleware []muxy.Middleware
}

Expand All @@ -45,7 +46,7 @@ func (p *HTTPProxy) Proxy() {
checkHTTPServerError(err)
config, err := pkiMgr.GetClientTLSConfig()
checkHTTPServerError(err)
config.InsecureSkipVerify = false
config.InsecureSkipVerify = p.Insecure

mux := http.NewServeMux()
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
Expand Down

0 comments on commit 529da81

Please sign in to comment.