forked from TrueCloudLab/frostfs-s3-gw
[#455] Allow preflight requests without auth
Signed-off-by: Marina Biryukova <m.biryukova@yadro.com>
This commit is contained in:
parent
c9c7379835
commit
8625b6e119
3 changed files with 31 additions and 3 deletions
|
@ -108,6 +108,10 @@ func PolicyCheck(cfg PolicyConfig) Func {
|
|||
}
|
||||
|
||||
func policyCheck(ctx context.Context, r *http.Request, cfg PolicyConfig) error {
|
||||
if r.Method == http.MethodOptions {
|
||||
return nil
|
||||
}
|
||||
|
||||
reqInfo := GetReqInfo(ctx)
|
||||
|
||||
req, userKey, userGroups, err := getPolicyRequest(ctx, r, cfg, reqInfo.RequestType, reqInfo.BucketName, reqInfo.ObjectName)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue