fix(uwsgi): add cache headers, redirects, et al., from olympia.ini#374
Merged
fix(uwsgi): add cache headers, redirects, et al., from olympia.ini#374
Conversation
…-Accel-Redirect sendfile for file serving
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
olympia.ini)Changes
docker/docker-entrypoint.shstart_web()Why
PR #372 fixed the immediate static file 404s with
--static-map. This PR carries over the remaining uWSGI settings fromthundernest-ansible/addons/olympia.inithat affect performance and behaviour:static-expires: 90-day cache headers (addresses reported slowness)static-safe: allows serving user-media uploads and add-on filesroute-if: HTTP-to-HTTPS redirectroute-uri: redirects Firefox/Android paths to addons.mozilla.orgroute-uri: content-disposition header for attachment downloadscollect-headerandresponse-route-if-not: X-Accel-Redirect sendfile for efficient large file servingReference: thundernest-ansible/addons/olympia.ini lines 55-67
Safety
No impact on running services until the new image is deployed. All settings are read-only file serving behaviour.
Follow-up
EFS mount targets (separate PR) will provide the actual persistent storage behind the user-media and files paths.