mirror of
https://github.com/minio/minio.git
synced 2026-02-07 19:30:15 -05:00
add isValidLocation to common parseLocation (#16690)
This commit is contained in:
@@ -58,6 +58,10 @@ func parseLocationConstraint(r *http.Request) (location string, s3Error APIError
|
||||
if location == "" {
|
||||
location = globalSite.Region
|
||||
}
|
||||
if !isValidLocation(location) {
|
||||
return location, ErrInvalidRegion
|
||||
}
|
||||
|
||||
return location, ErrNone
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user