supporting signed urls for private keys
This commit is contained in:
parent
284c6e91b9
commit
ea66a71765
2 changed files with 13 additions and 7 deletions
|
|
@ -548,8 +548,10 @@ class ResponseObject(_TemplateEnvironmentMixin):
|
|||
# header.
|
||||
if 'Authorization' not in request.headers:
|
||||
key = self.backend.get_key(bucket_name, key_name)
|
||||
if key and not key.acl.public_read:
|
||||
return 403, {}, ""
|
||||
signed_url = 'Signature=' in request.url
|
||||
if key:
|
||||
if not key.acl.public_read and not signed_url:
|
||||
return 403, {}, ""
|
||||
|
||||
if hasattr(request, 'body'):
|
||||
# Boto
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue