1
0
Fork 0
mirror of https://codeberg.org/ashley/poke.git synced 2024-11-16 22:54:38 -05:00

add page cache owo

This commit is contained in:
Ashley 2023-03-03 17:50:28 +00:00
parent abba478763
commit 424a6fb789

View file

@ -134,6 +134,15 @@ this is our config file,you can change stuff here
); // cache header
res.setHeader("poketube-cacher", "STATIC_FILES");
}
const a = config.cacher_max_age + 8000
if (!req.url.match(/^\/(css|js|img|font)\/.+/)) {
res.setHeader(
"Cache-Control",
"public, max-age=" + a
); // cache header
res.setHeader("poketube-cacher", "PAGE");
}
next();
});