From d0c40490a7017dd3584e139b5c1eaae39dca8854 Mon Sep 17 00:00:00 2001 From: Alex Zhao Date: Sat, 15 Apr 2023 00:17:48 +0800 Subject: [PATCH] feat: add `HostnameImmutable` to aws endpoint config (#1230) * add config to support S3-compatible urls like minio * add comment for HostnameImmutable * fix linting --- plugin/storage/s3/s3.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugin/storage/s3/s3.go b/plugin/storage/s3/s3.go index 6ecbab68..f6992172 100644 --- a/plugin/storage/s3/s3.go +++ b/plugin/storage/s3/s3.go @@ -33,6 +33,9 @@ func NewClient(ctx context.Context, config *Config) (*Client, error) { return aws.Endpoint{ URL: config.EndPoint, SigningRegion: config.Region, + // For some s3-compatible object stores, converting the hostname is not required, + // and not setting this option will result in not being able to access the corresponding object store address. + HostnameImmutable: true, }, nil })