From 364f8228de18a6eca9834b0b739828211e1f6b39 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 25 Aug 2024 01:43:40 -0700 Subject: [PATCH] Update weed/s3api/s3api_server.go --- weed/s3api/s3api_server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/s3api/s3api_server.go b/weed/s3api/s3api_server.go index be375f877..13954dde6 100644 --- a/weed/s3api/s3api_server.go +++ b/weed/s3api/s3api_server.go @@ -201,7 +201,7 @@ func (s3a *S3ApiServer) registerRouter(router *mux.Router) { // raw objects // HeadObject - bucket.Methods("HEAD").Path("/{object:.+}").HandlerFunc(track(s3a.AuthWithAcl(s3a.cb.Limit(s3a.HeadObjectHandler, ACTION_READ)), http.MethodGet)) + bucket.Methods(http.MethodHead).Path("/{object:.+}").HandlerFunc(track(s3a.AuthWithAcl(s3a.cb.Limit(s3a.HeadObjectHandler, ACTION_READ)), http.MethodGet)) // GetObject, but directory listing is not supported bucket.Methods(http.MethodGet).Path("/{object:.+}").HandlerFunc(track(s3a.AuthWithAcl(s3a.cb.Limit(s3a.GetObjectHandler, ACTION_READ)), http.MethodGet))