cloud drive: s3 configurable force path style

This commit is contained in:
Chris Lu
2021-08-23 03:30:41 -07:00
parent f0cc130849
commit 00c4e06caa
7 changed files with 159 additions and 143 deletions

View File

@@ -29,6 +29,7 @@ func (s s3RemoteStorageMaker) Make(conf *filer_pb.RemoteConf) (remote_storage.Re
config := &aws.Config{
Region: aws.String(conf.S3Region),
Endpoint: aws.String(conf.S3Endpoint),
S3ForcePathStyle: aws.Bool(conf.S3ForcePathStyle),
}
if conf.S3AccessKey != "" && conf.S3SecretKey != "" {
config.Credentials = credentials.NewStaticCredentials(conf.S3AccessKey, conf.S3SecretKey, "")