mirror of
https://github.com/minio/minio.git
synced 2025-11-20 09:56:07 -05:00
fix: obtain correct location string with DNS style buckets (#10060)
closes #10054
This commit is contained in:
@@ -396,8 +396,7 @@ func getObjectLocation(r *http.Request, domains []string, bucket, object string)
|
||||
}
|
||||
// If domain is set then we need to use bucket DNS style.
|
||||
for _, domain := range domains {
|
||||
if strings.Contains(r.Host, domain) {
|
||||
u.Host = bucket + "." + r.Host
|
||||
if strings.HasPrefix(r.Host, bucket+"."+domain) {
|
||||
u.Path = path.Join(SlashSeparator, object)
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user