feat: add HostnameImmutable to aws endpoint config (#1230)

* add config to support S3-compatible urls like minio

* add comment for HostnameImmutable

* fix linting
This commit is contained in:
Alex Zhao 2023-04-15 00:17:48 +08:00 committed by GitHub
parent 630d84348e
commit d0c40490a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
})