[#125] Fixed acl rule

Container must be public (basic acl) to enable bearer token.

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
Denis Kirillov 2021-07-07 17:58:53 +03:00
parent 0aae8c595a
commit 6ba5167f5d

View file

@ -20,6 +20,8 @@ const (
basicACLReadOnly = "public-read"
basicACLPublic = "public-read-write"
defaultPolicy = "REP 3"
publicBasicRule = 0x0FFFFFFF
)
func (h *handler) PutObjectHandler(w http.ResponseWriter, r *http.Request) {
@ -85,7 +87,7 @@ func (h *handler) CreateBucketHandler(w http.ResponseWriter, r *http.Request) {
if val, ok := r.Header["X-Amz-Acl"]; ok {
p.ACL, err = parseBasicACL(val[0])
} else {
p.ACL = acl.PrivateBasicRule
p.ACL = publicBasicRule
}
if err != nil {