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{ g.transport = &http.Transport{
DisableCompression: true, DisableCompression: true,
Proxy: http.ProxyFromEnvironment, 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 ( import (
"bytes" "bytes"
"crypto/tls"
"fmt" "fmt"
"net" "net"
"net/http" "net/http"
@ -124,6 +125,9 @@ func (g *OCIGetter) newRegistryClient() (*registry.Client, error) {
TLSHandshakeTimeout: 10 * time.Second, TLSHandshakeTimeout: 10 * time.Second,
ExpectContinueTimeout: 1 * time.Second, ExpectContinueTimeout: 1 * time.Second,
Proxy: http.ProxyFromEnvironment, 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