Fix cache-control headers to enable CDN caching of static assets #745
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.
Cloudflare was revalidating all JavaScript, CSS, and image files on every request because nginx was not sending cache-control headers.
Changes
Updated nginx configurations for production and staging:
Before:
After:
Static assets (JS/CSS/images) now cache for 1 year with
immutableflag. HTML remains uncached. Safe because Nuxt generates content-hashed filenames (app.abc123.js).Files Modified
provisioning/production/files/nginx/production.confprovisioning/staging/files/nginx/staging.confWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
iojs.org/usr/bin/curl curl --fail --compressed -q -L -s REDACTED -o -(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.