mirror of
https://codeberg.org/ashley/poke
synced 2025-04-06 09:38:00 +00:00
lol
This commit is contained in:
parent
5deb6e3780
commit
7c5f28552f
@ -46,7 +46,7 @@ app.use(function (req, res, next) {
|
|||||||
next();
|
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=232337763"); // cache header
|
||||||
res.setHeader("poketube-cacher", "PROXY_FILES");
|
res.setHeader("poketube-cacher", "PROXY_FILES");
|
||||||
@ -60,6 +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
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let url;
|
let url;
|
||||||
@ -99,7 +100,7 @@ app.get("/", (req, res) => {
|
|||||||
status: "200",
|
status: "200",
|
||||||
version: "1.1.0",
|
version: "1.1.0",
|
||||||
URL_WHITELIST,
|
URL_WHITELIST,
|
||||||
cache: "max-age-1848",
|
cache: "max-age-232337763",
|
||||||
};
|
};
|
||||||
|
|
||||||
res.json(json);
|
res.json(json);
|
||||||
|
Loading…
Reference in New Issue
Block a user