fix(http): honor insecure-skip-very even if custom tls config is specified

pull/15608/head
Nathaniel Cook 2019-10-10 15:09:03 -06:00
parent 4f1c8ccf9a
commit 589d278b24
1 changed files with 2 additions and 0 deletions

View File

@ -121,6 +121,8 @@ func NewHTTPClient(conf HTTPConfig) (Client, error) {
}
if conf.TLSConfig != nil {
tr.TLSClientConfig = conf.TLSConfig
// Make sure to preserve the InsecureSkipVerify setting from the config.
tr.TLSClientConfig.InsecureSkipVerify = conf.InsecureSkipVerify
}
return &client{
url: *u,