This commit is contained in:
Ashley //// 2024-01-20 17:11:42 +00:00
parent 55d33a38f1
commit b65d291a3e

View file

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