avoid setting headers for /api/config that will be duplicated by nginx

pull/1/head
ansuz 4 years ago
parent 9d6cc55642
commit 3c4b2ffad0

@ -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"); }

Loading…
Cancel
Save