Allow to set custom Cache-Control
header for custom error
#84330
mykolasmolis
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Non-Goals
No response
Background
When using customer errors (https://nextjs.org/docs/pages/building-your-application/routing/custom-error) there is a desire to be able to cache the response for some time. To reduce the load for functionality that is down for that moment. For example to cache the response on CDN by responding with custom
Cache-Control
header.Proposal
To support
getServerSideProps
on custom error pages in order to be able to set custom headers.Beta Was this translation helpful? Give feedback.
All reactions