mirror of
https://github.com/minio/minio.git
synced 2025-02-26 04:49:16 -05:00
fix: requests without bucket should route to the original router (#9541)
requests in federated setups for STS type calls which are performed at '/' resource should be routed by the muxer, the assumption is simply such that requests without a bucket in a federated setup cannot be proxied, so serve them at current server.
This commit is contained in:
parent
53f4c0fdc0
commit
0dd626ec67
@ -679,9 +679,12 @@ func (f bucketForwardingHandler) ServeHTTP(w http.ResponseWriter, r *http.Reques
|
||||
|
||||
bucket, object := request2BucketObjectName(r)
|
||||
|
||||
// ListBucket requests should be handled at current endpoint as
|
||||
// all buckets data can be fetched from here.
|
||||
if r.Method == http.MethodGet && bucket == "" && object == "" {
|
||||
// Requests in federated setups for STS type calls which are
|
||||
// performed at '/' resource should be routed by the muxer,
|
||||
// the assumption is simply such that requests without a bucket
|
||||
// in a federated setup cannot be proxied, so serve them at
|
||||
// current server.
|
||||
if bucket == "" {
|
||||
f.handler.ServeHTTP(w, r)
|
||||
return
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user