fix(transport): leverage same tls config

Signed-off-by: Paolo Gallina <paologallina1992@gmail.com>
pull/31126/head
Paolo Gallina 1 month ago
parent 505b487de2
commit f3c9407052
No known key found for this signature in database
GPG Key ID: C515AABEFFCAD808

@ -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