From f352c05f787a38999279e2dafde43fa3573c9b1b Mon Sep 17 00:00:00 2001 From: Aditya Patadia Date: Mon, 1 Oct 2018 18:03:32 +0530 Subject: [PATCH] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 93f89f6..6fa83d5 100644 --- a/index.js +++ b/index.js @@ -55,7 +55,7 @@ module.exports = function (defaults) { cacheControl.push(util.format('s-maxage=%d', options.sMaxAge)); } - if (cacheControl.length) { + if (cacheControl.length && !res.getHeader('Cache-Control')) { this.setHeader('Cache-Control', cacheControl.join(',')); } });