From 42f4aa824b3e76e8faec229b3c4499cff23d4b5d Mon Sep 17 00:00:00 2001 From: Konstantin Lebedev Date: Thu, 11 Nov 2021 11:34:01 +0500 Subject: [PATCH] force overwrite s3-is-admin https://github.com/chrislusf/seaweedfs/issues/2433 --- weed/s3api/auth_credentials.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/weed/s3api/auth_credentials.go b/weed/s3api/auth_credentials.go index 9e1cd7f86..d29e8692f 100644 --- a/weed/s3api/auth_credentials.go +++ b/weed/s3api/auth_credentials.go @@ -187,6 +187,8 @@ func (iam *IdentityAccessManagement) Auth(f http.HandlerFunc, action Action) htt r.Header.Set(xhttp.AmzIdentityId, identity.Name) if identity.isAdmin() { r.Header.Set(xhttp.AmzIsAdmin, "true") + } else if _, ok := r.Header[xhttp.AmzIsAdmin]; ok { + r.Header.Del(xhttp.AmzIsAdmin) } } f(w, r)