Commit 6e9ae48d by Zubair Afzal

Merge pull request #2863 from edx/zub/use-ManifestStaticFilesStorage-for-static-files-versioning

use django's storage backend ManifestStaticFilesStorage for static fi…
parents 4412dec2 c20a44a7
......@@ -121,7 +121,7 @@ CREDENTIALS_FILE_STORAGE_BACKEND:
STATIC_ROOT: '{{ CREDENTIALS_STATIC_ROOT }}'
MEDIA_URL: '{{ CREDENTIALS_MEDIA_URL }}'
STATIC_URL: '{{ CREDENTIALS_STATIC_URL }}'
STATICFILES_STORAGE: 'django.contrib.staticfiles.storage.StaticFilesStorage'
STATICFILES_STORAGE: 'django.contrib.staticfiles.storage.ManifestStaticFilesStorage'
DEFAULT_FILE_STORAGE: 'django.core.files.storage.FileSystemStorage'
# Note: the protocol for CORS whitelist values is necessary for matching the correct origin by nginx
......
......@@ -45,6 +45,7 @@ server {
location ~ ^{{ CREDENTIALS_STATIC_URL }}(?P<file>.*) {
root {{ CREDENTIALS_STATIC_ROOT }};
add_header Access-Control-Allow-Origin $cors_header always;
add_header Cache-Control "max-age=31536000";
try_files /$file =404;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment