From 3c4b2ffad0e45163f62742cae7ed50fd5c12b78f Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 3 Mar 2021 09:59:04 +0530 Subject: [PATCH] avoid setting headers for /api/config that will be duplicated by nginx --- server.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server.js b/server.js index 9e26500ad..33ffff10d 100644 --- a/server.js +++ b/server.js @@ -162,6 +162,8 @@ app.use(function (req, res, next) { return void res.end(); } + if (/^\/api\/config/.test(req.url)) { return void next(); } + setHeaders(req, res); if (/[\?\&]ver=[^\/]+$/.test(req.url)) { res.setHeader("Cache-Control", "max-age=31536000"); } else { res.setHeader("Cache-Control", "no-cache"); }