[django.contrib.admin] Static files on signed S3

12 views
Skip to first unread message

Manuel Jeckelmann

unread,
Sep 18, 2017, 12:05:01 PM9/18/17
to Django users
Hi list, 

In my app, I've configured STATICFILES_STORAGE to 'storages.backends.s3boto3.S3Boto3Storage'. The S3 storage I use is a custom instance, requiring v2-signed requests. 

What I've noticed now, is that static files base.css and forms.css get loaded nicely (using a S3v2-signed request). However, forms.css then imports further css files (fonts.css and widgets.css) and a svg file (icon-addlink.svg), which cannot be loaded. The reason being that css-imports in forms.css use the url(...) function, which does not sign requests, which in turn results in a 400-Bad request from my S3 storage. 

Has anyone else seen this behaviour? How did you handle it (knowing that I don't have enough privileges to change the S3-storage behaviour)? 
Is this even a bug with the CSS-url function not going through the STATICFILES_STORAGE backend?

Thanks for your advice, 
-Manuel

Reply all
Reply to author
Forward
0 new messages