Load proxy config when probing for server TLS certificate (#4052)

mc alias set recently started to probe the TLS certificate for
the remote server, however it should load the proxy environment
configuration if any.
This commit is contained in:
Anis Elleuch
2022-04-15 16:49:57 -07:00
committed by GitHub
parent 1187be0ad2
commit 606cdd3453
+1
View File
@@ -378,6 +378,7 @@ func promptTrustSelfSignedCert(ctx context.Context, endpoint, alias string) (*x5
client := http.Client{
Transport: &http.Transport{
Proxy: http.ProxyFromEnvironment,
TLSClientConfig: &tls.Config{
RootCAs: globalRootCAs, // make sure to use loaded certs before probing
},