mirror of
https://github.com/minio/minio.git
synced 2025-01-23 12:43:16 -05:00
Fix regression in admin router when no route matches (#8409)
When `mc admin user add` is attempted in gateway mode without etcd setup, NoSuchBucket error is returned instead of MethodNotAllowed. Regression from commit - e48005ddc72d0a26f689a77962a15d8eaa99bfe2
This commit is contained in:
parent
ee05280721
commit
3adc311c1c
@ -144,5 +144,6 @@ func registerAdminRouter(router *mux.Router, enableConfigOps, enableIAMOps bool)
|
||||
adminV1Router.Methods(http.MethodGet).Path("/kms/key/status").HandlerFunc(httpTraceAll(adminAPI.KMSKeyStatusHandler))
|
||||
|
||||
// If none of the routes match, return error.
|
||||
adminV1Router.NotFoundHandler = http.HandlerFunc(httpTraceHdrs(notFoundHandler))
|
||||
adminV1Router.MethodNotAllowedHandler = http.HandlerFunc(httpTraceAll(versionMismatchHandler))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user