mirror of
https://github.com/minio/minio.git
synced 2025-11-23 11:07:50 -05:00
Use MINIO_REGION environment variable for region configuration, closes #4287
This commit is contained in:
committed by
Harshavardhana
parent
dd7e47f264
commit
2de1921fe8
@@ -652,6 +652,15 @@ func (api gatewayAPIHandlers) PutBucketHandler(w http.ResponseWriter, r *http.Re
|
||||
return
|
||||
}
|
||||
|
||||
// validating region here, because isValidLocationConstraint
|
||||
// reads body which has been read already. So only validating
|
||||
// region here.
|
||||
serverRegion := serverConfig.GetRegion()
|
||||
if serverRegion != location {
|
||||
writeErrorResponse(w, ErrInvalidRegion, r.URL)
|
||||
return
|
||||
}
|
||||
|
||||
bucketLock := globalNSMutex.NewNSLock(bucket, "")
|
||||
bucketLock.Lock()
|
||||
defer bucketLock.Unlock()
|
||||
|
||||
Reference in New Issue
Block a user