mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-22 16:37:52 +01:00
1.3.0
This commit is contained in:
parent
55d33a38f1
commit
b65d291a3e
1 changed files with 4 additions and 4 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue