Disable s3 transport transparent compression/decompression

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
Brad Davidson
2025-01-14 21:56:20 +00:00
committed by Brad Davidson
parent 976b23d432
commit fd8348324d

View File

@@ -168,6 +168,12 @@ func (c *Controller) GetClient(ctx context.Context, etcdS3 *config.EtcdS3) (*Cli
}
tr := http.DefaultTransport.(*http.Transport).Clone()
// Set this value so that the underlying transport round-tripper
// doesn't try to auto decode the body of objects with
// content-encoding set to `gzip`.
// Ref: https://github.com/minio/minio-go/pull/752
tr.DisableCompression = true
// You can either disable SSL verification or use a custom CA bundle,
// it doesn't make sense to do both - if verification is disabled,
// the CA is not checked!