Skip to content
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

[Issue #2625] set max-ages for app pages #3100

Merged
merged 4 commits into from
Dec 6, 2024

Conversation

acouch
Copy link
Collaborator

@acouch acouch commented Dec 4, 2024

Summary

Fixes #2625

Time to review: 5 mins

Changes proposed

Explicitly set the headers for different parts of the app so they are cached by clients and the CDN appropriately.

coilysiren
coilysiren previously approved these changes Dec 4, 2024
@acouch acouch force-pushed the acouch/issue-2625-frontend-headers branch from 1fa8e9d to 6c3ddd0 Compare December 5, 2024 15:52
@acouch
Copy link
Collaborator Author

acouch commented Dec 5, 2024

Updated since review to include correct setting for stale-while-revalidate and stale-while-error which cloudfront supports. Unfortunately Next.js doesn't currently support overriding the Vary header, but leaving in in the hopes it is supported in the future.

@acouch acouch requested a review from coilysiren December 5, 2024 17:14
@@ -6,7 +6,7 @@
"node": ">=20.0.0"
},
"scripts": {
"all-checks": "npm run test && npm run lint && npm run ts:check && npm run build",
"all-checks": "npm run lint && npm run ts:check && npm run test && npm run build",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@doug-s-nava I moved npm run test last since the test takes longest and it stops if the test fails (which has happened a couple of times).

@acouch acouch merged commit 978ebbb into main Dec 6, 2024
8 checks passed
@acouch acouch deleted the acouch/issue-2625-frontend-headers branch December 6, 2024 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add cache lifetimes for frontend components
3 participants