-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify interaction between WHITENOISE_KEEP_ONLY_HASHED_FILES and WHITENOISE_ROOT #489
Comments
The Files in |
Ah, I see. I'd not realised that that was the expectation, though that explains how these could work together. I'm not actually sure why our setup is like that, though I know it pre-dates our use of Whitenoise. I'm guessing it does mean we have a single pipeline for all frontend/static files, which is potentially useful in keeping it simple. |
Description
The docs for
WHITENOISE_KEEP_ONLY_HASHED_FILES
indicate that it can be used to keep only hashed versions of files, which is useful for reducing the size of static files that need to be included in e.g: a Docker image or uploaded to a CDN. This sounds like it's potentially very useful, both for storage costs and build times.However it's not clear how to use this together with
WHITENOISE_ROOT
, where you typically do want the non-hashed filenames (though only for a very small number of files).Is there something in Whitenoise which can translate from the non-hashed names to the hashed names, so that at runtime both are served? Or are these two options incompatible?
Is there a way to use these together for most files, but then to keep the plain filenames around for those in
WHITENOISE_ROOT
? (Given the small number and likely small size of the latter, maintaining the duplication here feels reasonable).The text was updated successfully, but these errors were encountered: