mirror of
https://github.com/distribution/distribution.git
synced 2025-07-04 19:16:45 +00:00
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
@ -560,9 +560,8 @@ func New(ctx context.Context, params DriverParameters) (*Driver, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if params.SkipVerify {
|
if params.SkipVerify {
|
||||||
httpTransport := &http.Transport{
|
httpTransport := http.DefaultTransport.(*http.Transport).Clone()
|
||||||
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
|
httpTransport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
|
||||||
}
|
|
||||||
awsConfig.WithHTTPClient(&http.Client{
|
awsConfig.WithHTTPClient(&http.Client{
|
||||||
Transport: httpTransport,
|
Transport: httpTransport,
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user