mirror of
https://github.com/minio/minio.git
synced 2024-12-26 07:05:55 -05:00
Check for STS Action first to allow browser requests (#6796)
This commit is contained in:
parent
b6ab8f50fa
commit
d6572879a8
@ -109,10 +109,10 @@ func getRequestAuthType(r *http.Request) authType {
|
|||||||
return authTypeJWT
|
return authTypeJWT
|
||||||
} else if isRequestPostPolicySignatureV4(r) {
|
} else if isRequestPostPolicySignatureV4(r) {
|
||||||
return authTypePostPolicy
|
return authTypePostPolicy
|
||||||
} else if _, ok := r.Header["Authorization"]; !ok {
|
|
||||||
return authTypeAnonymous
|
|
||||||
} else if _, ok := r.URL.Query()["Action"]; ok {
|
} else if _, ok := r.URL.Query()["Action"]; ok {
|
||||||
return authTypeSTS
|
return authTypeSTS
|
||||||
|
} else if _, ok := r.Header["Authorization"]; !ok {
|
||||||
|
return authTypeAnonymous
|
||||||
}
|
}
|
||||||
return authTypeUnknown
|
return authTypeUnknown
|
||||||
}
|
}
|
||||||
@ -395,6 +395,9 @@ func (a authHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
a.handler.ServeHTTP(w, r)
|
a.handler.ServeHTTP(w, r)
|
||||||
return
|
return
|
||||||
|
} else if aType == authTypeSTS {
|
||||||
|
a.handler.ServeHTTP(w, r)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
writeErrorResponse(w, ErrSignatureVersionNotSupported, r.URL)
|
writeErrorResponse(w, ErrSignatureVersionNotSupported, r.URL)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user