-
Notifications
You must be signed in to change notification settings - Fork 112
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
server-adapter: prevent to replace correct swr header #162
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Just checking if you posted about this on #open-next on Discord? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Sorry for the long delay. I'll try to merge this by the end of week, there's some critical infra PRs that need to go in ahead of this. |
Added some unit tests but haven't set up the GH actions yet, waiting for #208 first |
Hmm, sorry for the random pushes, GH was glitching... it's behaving correctly now |
Hi @Tietew I merged this PR but had to revert b/c my commits on top of it was causing the app to add quotes in the URL... not sure what was causing that, it might have been from a strange rebase... anyways your commit is in the git history so thanks for your contribution. I'll cherrypick the code in this PR: #214 Edit: the code was fine, AWS deployment was buggy. I took down the app and redeploy and it's fine... very strange. |
@khuezy Thanks much for your work! |
server-adapter replaces
stale-while-revalidate
in Cache-Control header.ref. https://github.com/serverless-stack/open-next#workaround-nextserver-does-not-set-correct-swr-cache-headers
When getServerSideProps sets correct swr, for example:
server-adapter generates incorrect Cache-Control:
This PR fixes to prevent replacing
stale-while-revalidate=<duration>
.Test: