forked from TrueCloudLab/distribution
fix: use http.DefaultTransport in S3 client
Unfortunately one of the changes we merged in broken the support for http.ProxyFromEnvironment https://pkg.go.dev/net/http#ProxyFromEnvironment This commit attempts to fix that by cloning the http.DefaultTransport and updating it accordingly. Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
This commit is contained in:
parent
b8fb08e0a1
commit
8fa7a81cb2
1 changed files with 2 additions and 3 deletions
|
@ -560,9 +560,8 @@ func New(ctx context.Context, params DriverParameters) (*Driver, error) {
|
|||
}
|
||||
|
||||
if params.SkipVerify {
|
||||
httpTransport := &http.Transport{
|
||||
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
|
||||
}
|
||||
httpTransport := http.DefaultTransport.(*http.Transport).Clone()
|
||||
httpTransport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
|
||||
awsConfig.WithHTTPClient(&http.Client{
|
||||
Transport: httpTransport,
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue