From 4061b6fd87ce0c8bd54c2398746b6c0e2d2cf6d5 Mon Sep 17 00:00:00 2001 From: Dmitry Molotkov Date: Tue, 25 Sep 2018 18:16:15 +0300 Subject: [PATCH] dont allow to cache error pages (#3962) --- lib/core/middleware/error.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/core/middleware/error.js b/lib/core/middleware/error.js index ff5cd1f5b8..08f5b918e0 100644 --- a/lib/core/middleware/error.js +++ b/lib/core/middleware/error.js @@ -21,6 +21,7 @@ export default function errorMiddleware(err, req, res, next) { res.statusMessage = err.name res.setHeader('Content-Type', type + '; charset=utf-8') res.setHeader('Content-Length', Buffer.byteLength(content)) + res.setHeader('Cache-Control', 'no-cache, no-store, max-age=0, must-revalidate') // Send Response res.end(content, 'utf-8')