aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Lebedev <lebedev_k@tochka.com>2021-11-11 11:34:01 +0500
committerKonstantin Lebedev <lebedev_k@tochka.com>2021-11-11 11:34:01 +0500
commit42f4aa824b3e76e8faec229b3c4499cff23d4b5d (patch)
tree914f76c6587989a39fe1c0f421782126248fbe8e
parentb0b2a03ea726bfd35e64657e6fa5de0188a1c934 (diff)
downloadseaweedfs-42f4aa824b3e76e8faec229b3c4499cff23d4b5d.tar.xz
seaweedfs-42f4aa824b3e76e8faec229b3c4499cff23d4b5d.zip
force overwrite s3-is-admin
https://github.com/chrislusf/seaweedfs/issues/2433
-rw-r--r--weed/s3api/auth_credentials.go2
1 files changed, 2 insertions, 0 deletions
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)