mirror of
https://github.com/minio/minio.git
synced 2025-11-10 05:59:43 -05:00
signature: use region from Auth header if server's region not configured (#4329)
This commit is contained in:
committed by
Harshavardhana
parent
465274cd21
commit
5db1e9f3dd
@@ -38,7 +38,7 @@ func parseLocationConstraint(r *http.Request) (location string, s3Error APIError
|
||||
} // else for both err as nil or io.EOF
|
||||
location = locationConstraint.Location
|
||||
if location == "" {
|
||||
location = globalMinioDefaultRegion
|
||||
location = serverConfig.GetRegion()
|
||||
}
|
||||
return location, ErrNone
|
||||
}
|
||||
@@ -46,7 +46,7 @@ func parseLocationConstraint(r *http.Request) (location string, s3Error APIError
|
||||
// Validates input location is same as configured region
|
||||
// of Minio server.
|
||||
func isValidLocation(location string) bool {
|
||||
return serverConfig.GetRegion() == location
|
||||
return serverConfig.GetRegion() == "" || serverConfig.GetRegion() == location
|
||||
}
|
||||
|
||||
// Supported headers that needs to be extracted.
|
||||
|
||||
Reference in New Issue
Block a user