mirror of
https://github.com/minio/minio.git
synced 2025-01-12 07:23:23 -05:00
api: No need to set x-amz-bucket-region if region is empty. (#4586)
This commit is contained in:
parent
237c8af5ef
commit
8b7df7da37
@ -36,7 +36,11 @@ func setCommonHeaders(w http.ResponseWriter) {
|
|||||||
// Set unique request ID for each reply.
|
// Set unique request ID for each reply.
|
||||||
w.Header().Set(responseRequestIDKey, mustGetRequestID(UTCNow()))
|
w.Header().Set(responseRequestIDKey, mustGetRequestID(UTCNow()))
|
||||||
w.Header().Set("Server", globalServerUserAgent)
|
w.Header().Set("Server", globalServerUserAgent)
|
||||||
w.Header().Set("X-Amz-Bucket-Region", serverConfig.GetRegion())
|
// Set `x-amz-bucket-region` only if region is set on the server
|
||||||
|
// by default minio uses an empty region.
|
||||||
|
if region := serverConfig.GetRegion(); region != "" {
|
||||||
|
w.Header().Set("X-Amz-Bucket-Region", region)
|
||||||
|
}
|
||||||
w.Header().Set("Accept-Ranges", "bytes")
|
w.Header().Set("Accept-Ranges", "bytes")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user