mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
Avoid trailing '/' for buckets and also re-directs - in accordance with aws clients
This commit is contained in:
@@ -67,11 +67,9 @@ func HttpHandler(storage mstorage.Storage) http.Handler {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
// Re-direct /path to /path/
|
||||
mux.StrictSlash(true)
|
||||
mux.HandleFunc("/", api.listBucketsHandler).Methods("GET")
|
||||
mux.HandleFunc("/{bucket}/", api.listObjectsHandler).Methods("GET")
|
||||
mux.HandleFunc("/{bucket}/", api.putBucketHandler).Methods("PUT")
|
||||
mux.HandleFunc("/{bucket}", api.listObjectsHandler).Methods("GET")
|
||||
mux.HandleFunc("/{bucket}", api.putBucketHandler).Methods("PUT")
|
||||
mux.HandleFunc("/{bucket}/{object:.*}", api.getObjectHandler).Methods("GET")
|
||||
mux.HandleFunc("/{bucket}/{object:.*}", api.headObjectHandler).Methods("HEAD")
|
||||
mux.HandleFunc("/{bucket}/{object:.*}", api.putObjectHandler).Methods("PUT")
|
||||
|
||||
Reference in New Issue
Block a user