Skip to content

Commit

Permalink
http_proxy: log when using custom root CA certificates
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatczuk committed Aug 2, 2023
1 parent 6119668 commit b5fabbf
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions http_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,8 @@ func NewHTTPProxy(cfg *HTTPProxyConfig, pr PACResolver, cm *CredentialsMatcher,
rt = http.DefaultTransport.(*http.Transport).Clone() //nolint:forcetypeassert // we know it's a *http.Transport
} else if tr, ok := rt.(*http.Transport); !ok {
log.Debugf("using custom HTTP transport %T", rt)
} else {
if tr.TLSClientConfig != nil && tr.TLSClientConfig.RootCAs != nil {
log.Infof("using custom root CA certificates")
}
} else if tr.TLSClientConfig != nil && tr.TLSClientConfig.RootCAs != nil {
log.Infof("using custom root CA certificates")
}
hp := &HTTPProxy{
config: *cfg,
Expand Down

0 comments on commit b5fabbf

Please sign in to comment.