Skip to content

Commit

Permalink
Fix bug 1300090: Exempt css files from softlinkstatic.py
Browse files Browse the repository at this point in the history
The content of the hashed CSS files is different from the
non-hashed versions. In the former the references to other
files (e.g. images) have been changed to their hashed versions.
We want to keep these versions since they are served with far-future
cache headers and thus reduce our server loads.
  • Loading branch information
pmac committed Sep 14, 2016
1 parent fa2ad34 commit 9b49357
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docker/bin/softlinkstatic.py
Expand Up @@ -10,6 +10,12 @@
for orig, hashed in static_files['paths'].items():
if '?' in orig:
continue

if orig.endswith('.css'):
# contents of hashed css files have been modified to referenced
# other hashed files (images and whatnot). We want to keep that.
continue

hashed_path = os.path.join('./static', hashed)
orig_filename = os.path.split(orig)[1]

Expand Down

0 comments on commit 9b49357

Please sign in to comment.