This commit is contained in:
Ashley 2023-11-29 19:35:08 +00:00
parent 5deb6e3780
commit 7c5f28552f

View file

@ -46,7 +46,7 @@ app.use(function (req, res, next) {
next();
});
app.use(function (req, res, next) {
app.use(function (_req, res, next) {
res.header("Access-Control-Allow-Origin", "*");
res.setHeader("Cache-Control", "public, max-age=232337763"); // cache header
res.setHeader("poketube-cacher", "PROXY_FILES");
@ -60,6 +60,7 @@ app.use(function (req, res, next) {
*/
const proxy = async (req, res) => {
const { fetch } = await import("undici")
res.setHeader("Cache-Control", "public, max-age=232337763"); // cache header
try {
let url;
@ -99,7 +100,7 @@ app.get("/", (req, res) => {
status: "200",
version: "1.1.0",
URL_WHITELIST,
cache: "max-age-1848",
cache: "max-age-232337763",
};
res.json(json);