Browse Source

do not force path style for better compatibility

pull/2280/head
Chris Lu 3 years ago
parent
commit
f0cc130849
  1. 1
      weed/remote_storage/s3/s3_storage_client.go
  2. 1
      weed/replication/sink/s3sink/s3_sink.go
  3. 1
      weed/storage/backend/s3_backend/s3_sessions.go

1
weed/remote_storage/s3/s3_storage_client.go

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

1
weed/replication/sink/s3sink/s3_sink.go

@ -76,7 +76,6 @@ func (s3sink *S3Sink) initialize(awsAccessKeyId, awsSecretAccessKey, region, buc
config := &aws.Config{ config := &aws.Config{
Region: aws.String(s3sink.region), Region: aws.String(s3sink.region),
Endpoint: aws.String(s3sink.endpoint), Endpoint: aws.String(s3sink.endpoint),
S3ForcePathStyle: aws.Bool(true),
} }
if awsAccessKeyId != "" && awsSecretAccessKey != "" { if awsAccessKeyId != "" && awsSecretAccessKey != "" {
config.Credentials = credentials.NewStaticCredentials(awsAccessKeyId, awsSecretAccessKey, "") config.Credentials = credentials.NewStaticCredentials(awsAccessKeyId, awsSecretAccessKey, "")

1
weed/storage/backend/s3_backend/s3_sessions.go

@ -36,7 +36,6 @@ func createSession(awsAccessKeyId, awsSecretAccessKey, region, endpoint string)
config := &aws.Config{ config := &aws.Config{
Region: aws.String(region), Region: aws.String(region),
Endpoint: aws.String(endpoint), Endpoint: aws.String(endpoint),
S3ForcePathStyle: aws.Bool(true),
} }
if awsAccessKeyId != "" && awsSecretAccessKey != "" { if awsAccessKeyId != "" && awsSecretAccessKey != "" {
config.Credentials = credentials.NewStaticCredentials(awsAccessKeyId, awsSecretAccessKey, "") config.Credentials = credentials.NewStaticCredentials(awsAccessKeyId, awsSecretAccessKey, "")

Loading…
Cancel
Save