fix: re-arrange handlers to handle requests on /minio (#11177)

fixes #11175
This commit is contained in:
Harshavardhana 2020-12-28 17:10:33 -08:00 committed by GitHub
parent 445a9bd827
commit ca0d31b09a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -93,8 +93,12 @@ func configureServerHandler(endpointServerPools EndpointServerPools) (http.Handl
registerDistErasureRouters(router, endpointServerPools)
}
// Add STS router always.
registerSTSRouter(router)
// Register web router when its enabled.
if globalBrowserEnabled {
if err := registerWebRouter(router); err != nil {
return nil, err
}
}
// Add Admin router, all APIs are enabled in server mode.
registerAdminRouter(router, true, true)
@ -105,12 +109,8 @@ func configureServerHandler(endpointServerPools EndpointServerPools) (http.Handl
// Add server metrics router
registerMetricsRouter(router)
// Register web router when its enabled.
if globalBrowserEnabled {
if err := registerWebRouter(router); err != nil {
return nil, err
}
}
// Add STS router always.
registerSTSRouter(router)
// Add API router
registerAPIRouter(router)