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 04a3213 commit 6119668
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion http_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,12 @@ func NewHTTPProxy(cfg *HTTPProxyConfig, pr PACResolver, cm *CredentialsMatcher,
if rt == nil {
log.Infof("HTTP transport not configured, using standard library default")
rt = http.DefaultTransport.(*http.Transport).Clone() //nolint:forcetypeassert // we know it's a *http.Transport
} else if _, ok := rt.(*http.Transport); !ok {
} 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")
}
}
hp := &HTTPProxy{
config: *cfg,
Expand Down

0 comments on commit 6119668

Please sign in to comment.