Skip to content

Commit

Permalink
ListBuckets: Allow listBuckets request to be signed with region confi…
Browse files Browse the repository at this point in the history
…gured in config.json (minio#3374)

Fixes minio#3373
  • Loading branch information
Krishna Srinivas authored and harshavardhana committed Nov 30, 2016
1 parent 8021061 commit 38edd94
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cmd/bucket-handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,15 @@ func (api objectAPIHandlers) ListBucketsHandler(w http.ResponseWriter, r *http.R
}

// ListBuckets does not have any bucket action.
if s3Error := checkRequestAuthType(r, "", "", "us-east-1"); s3Error != ErrNone {
s3Error := checkRequestAuthType(r, "", "", "us-east-1")
if s3Error == ErrInvalidRegion {
// Clients like boto3 send listBuckets() call signed with region that is configured.
s3Error = checkRequestAuthType(r, "", "", serverConfig.GetRegion())
}
if s3Error != ErrNone {
writeErrorResponse(w, r, s3Error, r.URL.Path)
return
}

// Invoke the list buckets.
bucketsInfo, err := objectAPI.ListBuckets()
if err != nil {
Expand Down

0 comments on commit 38edd94

Please sign in to comment.