From 9abbea8571a8cc23f78cb3f201e0c06acafd5ec8 Mon Sep 17 00:00:00 2001 From: Tomas Roos Date: Tue, 4 Sep 2018 14:13:15 +0200 Subject: [PATCH] Make sure that 404's is not cached by CDN:s (#5088) --- server/render.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/render.js b/server/render.js index 7fa36c43..3106cfc6 100644 --- a/server/render.js +++ b/server/render.js @@ -193,7 +193,7 @@ async function doRender (req, res, pathname, query, { export async function renderScriptError (req, res, page, error) { // Asks CDNs and others to not to cache the errored page - res.setHeader('Cache-Control', 'no-cache, no-store, must-revalidate') + res.setHeader('Cache-Control', 'no-cache, no-store, max-age=0, must-revalidate') if (error.code === 'ENOENT' || error.message === 'INVALID_BUILD_ID') { res.statusCode = 404