s3: add option to disable AWS dual-stack endpoints (#22060)

Co-authored-by: Michael Eischer <michael.eischer@fau.de>
This commit is contained in:
subomiandMichael Eischer authored and GitHub committed 2026-11-05 19:07:43 +00:00
1 parent b5463d900d
commit 83a2726a30
4 files changed
+23

No files matched your search

+1
View File
@@ -32,6 +32,7 @@ type Config struct {
Region string `option:"region" help:"set region"`
BucketLookup string `option:"bucket-lookup" help:"bucket lookup style: 'auto', 'dns', or 'path'"`
ListObjectsV1 bool `option:"list-objects-v1" help:"use deprecated V1 api for ListObjects calls"`
DisableDualstack bool `option:"disable-dualstack" help:"do not use AWS S3 dual-stack endpoints, which VPC endpoints do not support"`
UnsafeAnonymousAuth bool `option:"unsafe-anonymous-auth" help:"use anonymous authentication"`
// For testing only
+6
View File
@@ -89,6 +89,12 @@ func open(cfg Config, rt http.RoundTripper) (*s3, error) {
return nil, errors.Wrap(err, "minio.New")
}
if cfg.DisableDualstack {
// VPC interface and gateway endpoints have no dual-stack support, so
// resolving to one makes the bucket unreachable from within the VPC
client.SetS3EnableDualstack(false)
}
be := &s3{
client: client,
cfg: cfg,