Merge pull request #31126 from paologallinaharbur/fix/leverageSameTLSconfig

fix(transport): leverage same tls config
pull/30867/merge
Matt Farina 3 weeks ago committed by GitHub
commit 8affd6178f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -122,6 +122,9 @@ func (g *HTTPGetter) httpClient() (*http.Client, error) {
g.transport = &http.Transport{
DisableCompression: true,
Proxy: http.ProxyFromEnvironment,
// Being nil would cause the tls.Config default to be used
// "NewTLSConfig" modifies an empty TLS config, not the default one
TLSClientConfig: &tls.Config{},
}
})

@ -17,6 +17,7 @@ package getter
import (
"bytes"
"crypto/tls"
"fmt"
"net"
"net/http"
@ -124,6 +125,9 @@ func (g *OCIGetter) newRegistryClient() (*registry.Client, error) {
TLSHandshakeTimeout: 10 * time.Second,
ExpectContinueTimeout: 1 * time.Second,
Proxy: http.ProxyFromEnvironment,
// Being nil would cause the tls.Config default to be used
// "NewTLSConfig" modifies an empty TLS config, not the default one
TLSClientConfig: &tls.Config{},
}
})

Loading…
Cancel
Save