-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
Labels
bugIssue was opened via the bug report template.Issue was opened via the bug report template.
Description
What version of Next.js are you using?
10.0.6
What version of Node.js are you using?
14.15.1
What browser are you using?
Chrome
What operating system are you using?
macOS
How are you deploying your application?
Other platform
Describe the Bug
The 404 error page responds with the cache headers cache-control: s-maxage=31536000, stale-while-revalidate when the getStaticProps function is exported.
This could be a problem when the resource is temporary unavailable.
Expected Behavior
The cache headers for the 404 responses should be cache-control: public, max-age=0, must-revalidate like when the getStaticProps function is not exported.
To Reproduce
npx create-next-app- Add a 404.js page with
getStaticProps npm run build && npm start- Request a non-existent route, like
http://localhost:3000/_next/static/give-me-a-404-response
simonecorsi, JellyBellyDev, Pardoz, alejandro, oriolcp and 2 more
Metadata
Metadata
Assignees
Labels
bugIssue was opened via the bug report template.Issue was opened via the bug report template.