Skip to content

Commit 9abbea8

Browse files
ptomasroostimneutkens
authored andcommitted
Make sure that 404's is not cached by CDN:s (#5088)
1 parent a6114d4 commit 9abbea8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/render.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ async function doRender (req, res, pathname, query, {
193193

194194
export async function renderScriptError (req, res, page, error) {
195195
// Asks CDNs and others to not to cache the errored page
196-
res.setHeader('Cache-Control', 'no-cache, no-store, must-revalidate')
196+
res.setHeader('Cache-Control', 'no-cache, no-store, max-age=0, must-revalidate')
197197

198198
if (error.code === 'ENOENT' || error.message === 'INVALID_BUILD_ID') {
199199
res.statusCode = 404

0 commit comments

Comments
 (0)