mirror of https://github.com/xwiki-labs/cryptpad
avoid setting headers for /api/config that will be duplicated by nginx
This commit is contained in:
parent
9d6cc55642
commit
3c4b2ffad0
|
@ -162,6 +162,8 @@ app.use(function (req, res, next) {
|
||||||
return void res.end();
|
return void res.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (/^\/api\/config/.test(req.url)) { return void next(); }
|
||||||
|
|
||||||
setHeaders(req, res);
|
setHeaders(req, res);
|
||||||
if (/[\?\&]ver=[^\/]+$/.test(req.url)) { res.setHeader("Cache-Control", "max-age=31536000"); }
|
if (/[\?\&]ver=[^\/]+$/.test(req.url)) { res.setHeader("Cache-Control", "max-age=31536000"); }
|
||||||
else { res.setHeader("Cache-Control", "no-cache"); }
|
else { res.setHeader("Cache-Control", "no-cache"); }
|
||||||
|
|
Loading…
Reference in New Issue