mirror of
https://github.com/minio/minio.git
synced 2025-04-01 02:03:42 -04:00
Add bucket resources to ignore handler
This commit is contained in:
parent
39250b7c49
commit
26aac9a439
@ -61,12 +61,12 @@ func HttpHandler(storage mstorage.Storage) http.Handler {
|
|||||||
mux.HandleFunc("/{bucket}/{object:.*}", api.headObjectHandler).Methods("HEAD")
|
mux.HandleFunc("/{bucket}/{object:.*}", api.headObjectHandler).Methods("HEAD")
|
||||||
mux.HandleFunc("/{bucket}/{object:.*}", api.putObjectHandler).Methods("PUT")
|
mux.HandleFunc("/{bucket}/{object:.*}", api.putObjectHandler).Methods("PUT")
|
||||||
|
|
||||||
return ignoreUnimplementedBucketResources(mux)
|
return ignoreUnimplementedResources(mux)
|
||||||
}
|
}
|
||||||
|
|
||||||
func ignoreUnimplementedBucketResources(h http.Handler) http.Handler {
|
func ignoreUnimplementedResources(h http.Handler) http.Handler {
|
||||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
if ignoreUnImplementedObjectResources(r) {
|
if ignoreUnImplementedObjectResources(r) || ignoreUnImplementedBucketResources(r) {
|
||||||
w.WriteHeader(http.StatusNotImplemented)
|
w.WriteHeader(http.StatusNotImplemented)
|
||||||
} else {
|
} else {
|
||||||
h.ServeHTTP(w, r)
|
h.ServeHTTP(w, r)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user