aboutsummaryrefslogtreecommitdiff
path: root/weed/s3api
diff options
context:
space:
mode:
authorGuo Lei <snipergg@163.com>2022-06-15 15:28:40 +0800
committerGitHub <noreply@github.com>2022-06-15 15:28:40 +0800
commit3df84cabf67918beb4bb4f56c4250e57c0f219c5 (patch)
treee9d76793170ee607e915f7679bb35a667ace397e /weed/s3api
parent695e8c75551b7de9f47723b682f0cb0ab4b74002 (diff)
parentb8ce05c9047cc95d76b57116affeb4ca7385c34a (diff)
downloadseaweedfs-3df84cabf67918beb4bb4f56c4250e57c0f219c5.tar.xz
seaweedfs-3df84cabf67918beb4bb4f56c4250e57c0f219c5.zip
Merge branch 'chrislusf:master' into weed_update
Diffstat (limited to 'weed/s3api')
-rw-r--r--weed/s3api/auth_credentials.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/weed/s3api/auth_credentials.go b/weed/s3api/auth_credentials.go
index 757e3ddd9..fb23d9ce9 100644
--- a/weed/s3api/auth_credentials.go
+++ b/weed/s3api/auth_credentials.go
@@ -176,12 +176,12 @@ func (iam *IdentityAccessManagement) lookupAnonymous() (identity *Identity, foun
}
func (iam *IdentityAccessManagement) Auth(f http.HandlerFunc, action Action) http.HandlerFunc {
-
- if !iam.isEnabled() {
- return f
- }
-
return func(w http.ResponseWriter, r *http.Request) {
+ if !iam.isEnabled() {
+ f(w, r)
+ return
+ }
+
identity, errCode := iam.authRequest(r, action)
if errCode == s3err.ErrNone {
if identity != nil && identity.Name != "" {