mirror of
https://github.com/minio/minio.git
synced 2025-04-21 02:54:24 -04:00
* I needed to remove the region check from PutBucketHandler
This commit is contained in:
parent
8085ba4494
commit
d86973dcca
@ -229,11 +229,6 @@ func (l *gcsGateway) MakeBucket(bucket string) error {
|
|||||||
func (l *gcsGateway) MakeBucketWithLocation(bucket, location string) error {
|
func (l *gcsGateway) MakeBucketWithLocation(bucket, location string) error {
|
||||||
bkt := l.client.Bucket(bucket)
|
bkt := l.client.Bucket(bucket)
|
||||||
|
|
||||||
// we'll default to the us multi-region in case of us-east-1
|
|
||||||
if location == "us-east-1" {
|
|
||||||
location = "us"
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := bkt.Create(l.ctx, l.projectID, &storage.BucketAttrs{
|
if err := bkt.Create(l.ctx, l.projectID, &storage.BucketAttrs{
|
||||||
Location: location,
|
Location: location,
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
|
@ -653,15 +653,6 @@ func (api gatewayAPIHandlers) PutBucketHandler(w http.ResponseWriter, r *http.Re
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// validating region here, because isValidLocationConstraint
|
|
||||||
// reads body which has been read already. So only validating
|
|
||||||
// region here.
|
|
||||||
serverRegion := serverConfig.GetRegion()
|
|
||||||
if serverRegion != "" && serverRegion != location {
|
|
||||||
writeErrorResponse(w, ErrInvalidRegion, r.URL)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
bucketLock := globalNSMutex.NewNSLock(bucket, "")
|
bucketLock := globalNSMutex.NewNSLock(bucket, "")
|
||||||
bucketLock.Lock()
|
bucketLock.Lock()
|
||||||
defer bucketLock.Unlock()
|
defer bucketLock.Unlock()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user