rsnext/packages
JJ Kasper 16caf41995
Fix inconsistency with 404 getStaticProps cache-control (#66674)
While investigating unexpected stale responses when leveraging
`getStaticProps` on the 404 page noticed we have an inconsistency
between local and deployed due to `Cache-Control` being set to
`no-store, must-revalidate` even though a revalidate period is provided.
The inconsistency also differs between the HTML response and the data
response `_next/data` which causes even more unexpected behavior. To
avoid this behavior, this replaces the handling to ensure we honor the
originally provided revalidate period during `notFound: true` for the
`Cache-Control` header.

Validated against provided reproduction here
https://github.com/fusdev0/next-notfound-revalidate
Deployment:
https://vercel.live/link/next-notfound-revalidate-govzskknf-vtest314-ijjk-testing.vercel.app/fallback-blocking/fasdf

Prior PR for prior context that introduced this
https://github.com/vercel/next.js/pull/19165

x-ref: [slack
thread](https://vercel.slack.com/archives/C0676QZBWKS/p1717492459342109)
2024-06-10 12:13:05 -07:00
..
create-next-app v15.0.0-canary.23 2024-06-10 13:23:50 +00:00
eslint-config-next v15.0.0-canary.23 2024-06-10 13:23:50 +00:00
eslint-plugin-next v15.0.0-canary.23 2024-06-10 13:23:50 +00:00
font v15.0.0-canary.23 2024-06-10 13:23:50 +00:00
next Fix inconsistency with 404 getStaticProps cache-control (#66674) 2024-06-10 12:13:05 -07:00
next-bundle-analyzer v15.0.0-canary.23 2024-06-10 13:23:50 +00:00
next-codemod v15.0.0-canary.23 2024-06-10 13:23:50 +00:00
next-env v15.0.0-canary.23 2024-06-10 13:23:50 +00:00
next-mdx v15.0.0-canary.23 2024-06-10 13:23:50 +00:00
next-plugin-storybook v15.0.0-canary.23 2024-06-10 13:23:50 +00:00
next-polyfill-module v15.0.0-canary.23 2024-06-10 13:23:50 +00:00
next-polyfill-nomodule v15.0.0-canary.23 2024-06-10 13:23:50 +00:00
next-swc Append sitemap extension and optimize imafe metadata static generation (#66477) 2024-06-10 17:34:06 +02:00
react-refresh-utils v15.0.0-canary.23 2024-06-10 13:23:50 +00:00
third-parties v15.0.0-canary.23 2024-06-10 13:23:50 +00:00