Compare commits
2 Commits
93017002b9
...
0219cc7f83
Author | SHA1 | Date | |
---|---|---|---|
0219cc7f83 | |||
47a05b243f |
2
index.js
2
index.js
@ -63,7 +63,6 @@ async function serveId(id, req, res, next) {
|
||||
res.status(203);
|
||||
res.type(pxreq.headers.get("Content-Type"));
|
||||
res.header("Content-Disposition", `filename=${url.split('/').pop()}`);
|
||||
res.header("Cache-Control", "max-age=99999999999999");
|
||||
res.header("X-Pixiv-Id", id);
|
||||
if (req.query.auto) res.header("Refresh", `${Number(req.query.auto)}; url=${getRandomUrl(req)}`);
|
||||
pxreq.body.pipe(res);
|
||||
@ -107,6 +106,7 @@ app.get("/img/random", (req, res, next) => {
|
||||
|
||||
// simple serve id without redirects
|
||||
app.get("/img/:id", (req, res, next) => {
|
||||
res.header("Cache-Control", "max-age=99999999999999");
|
||||
serveId(req.params.id, req, res, next);
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user