Skip to content

Commit

Permalink
Never mess with new-style S3 URLs.
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
  • Loading branch information
lamby committed Nov 29, 2017
1 parent 9e84061 commit d632662
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions django_yadt/fields.py
Expand Up @@ -209,6 +209,11 @@ def __repr__(self):
def url(self):
url = default_storage.url(self._filename())

# Never mess with new-style S3 "v4" URLs; modifying the querystring
# breaks all authentication.
if 'X-Amz-Algorithm=' in url:
return url

if self.image.field.cachebusting_field:
suffix = getattr(
self.instance,
Expand Down

0 comments on commit d632662

Please sign in to comment.