From 5d0a9c08037811ea153abfcd5e58f5f7db8f9751 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 11 Jun 2019 13:59:10 -0700 Subject: [PATCH] Make sure to preserve region specific URLs (#2791) This is to ensure that restricted access to certain buckets is allowed on certain regions. This is a continuation of last commit --- cmd/client-s3.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/cmd/client-s3.go b/cmd/client-s3.go index b22c36ba..3be8d61d 100644 --- a/cmd/client-s3.go +++ b/cmd/client-s3.go @@ -53,7 +53,6 @@ type s3Client struct { } const ( - amazonHostName = "s3.amazonaws.com" amazonHostNameAccelerated = "s3-accelerate.amazonaws.com" googleHostName = "storage.googleapis.com" @@ -109,11 +108,6 @@ func newFactory() func(config *Config) (Client, *probe.Error) { isS3AcceleratedEndpoint := isAmazonAccelerated(hostName) if s3Clnt.virtualStyle { - // If Amazon URL replace it with 's3.amazonaws.com' - if isAmazon(hostName) || isAmazonAccelerated(hostName) { - hostName = amazonHostName - } - // If Google URL replace it with 'storage.googleapis.com' if isGoogle(hostName) { hostName = googleHostName