Skip to content

Commit

Permalink
Make sure to preserve region specific URLs (#2791)
Browse files Browse the repository at this point in the history
This is to ensure that restricted access
to certain buckets is allowed on certain
regions.

This is a continuation of last commit
  • Loading branch information
harshavardhana authored and kannappanr committed Jun 11, 2019
1 parent b85dabd commit 5d0a9c0
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions cmd/client-s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ type s3Client struct {
}

const (
amazonHostName = "s3.amazonaws.com"
amazonHostNameAccelerated = "s3-accelerate.amazonaws.com"

googleHostName = "storage.googleapis.com"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5d0a9c0

Please sign in to comment.