forked from TrueCloudLab/frostfs-s3-gw
[#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:
parent
0aae8c595a
commit
6ba5167f5d
1 changed files with 3 additions and 1 deletions
|
@ -20,6 +20,8 @@ const (
|
||||||
basicACLReadOnly = "public-read"
|
basicACLReadOnly = "public-read"
|
||||||
basicACLPublic = "public-read-write"
|
basicACLPublic = "public-read-write"
|
||||||
defaultPolicy = "REP 3"
|
defaultPolicy = "REP 3"
|
||||||
|
|
||||||
|
publicBasicRule = 0x0FFFFFFF
|
||||||
)
|
)
|
||||||
|
|
||||||
func (h *handler) PutObjectHandler(w http.ResponseWriter, r *http.Request) {
|
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 {
|
if val, ok := r.Header["X-Amz-Acl"]; ok {
|
||||||
p.ACL, err = parseBasicACL(val[0])
|
p.ACL, err = parseBasicACL(val[0])
|
||||||
} else {
|
} else {
|
||||||
p.ACL = acl.PrivateBasicRule
|
p.ACL = publicBasicRule
|
||||||
}
|
}
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue