change routes
This commit is contained in:
parent
b4b82ea478
commit
bc4951deee
|
@ -130,9 +130,14 @@ const winEtag = etag(
|
||||||
{ weak: true },
|
{ weak: true },
|
||||||
);
|
);
|
||||||
|
|
||||||
router.get(
|
router.use(
|
||||||
`/:t(${AVAILABLE_POPUPS.map((p) => p.toLowerCase()).join('|')})`,
|
AVAILABLE_POPUPS.map((p) => `/${p.toLowerCase()}`),
|
||||||
async (req, res) => {
|
(req, res, next) => {
|
||||||
|
if (req.method !== 'GET') {
|
||||||
|
next();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
res.set({
|
res.set({
|
||||||
'Cache-Control': `private, max-age=${15 * 60}`, // seconds
|
'Cache-Control': `private, max-age=${15 * 60}`, // seconds
|
||||||
'Content-Type': 'text/html; charset=utf-8',
|
'Content-Type': 'text/html; charset=utf-8',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user