Compare commits
No commits in common. "175a86b4900904d34eb877a3ea23ddcc031c4faf" and "c4d55ec6c759cc6e3d4fb5b854ef016f04f6b392" have entirely different histories.
175a86b490
...
c4d55ec6c7
10
index.js
10
index.js
@ -56,12 +56,12 @@ async function serveId(id, req, res, next) {
|
||||
if (!url) return res.status(400).type("text").send(`size must be one of the following: ${Object.keys(pages[0].urls).join(', ')}`);
|
||||
|
||||
var pxreq = await fetch(url, { headers: {"Referer": "https://www.pixiv.net"} });
|
||||
//if (pxreq.status != 200 && size == "original") {
|
||||
// res.header("X-Using-Backup", '1');
|
||||
// pxreq = await fetch(`https://39.hmbp.gq/https://www.pixiv.net/en/artworks/${id}?noredirect`);
|
||||
//}
|
||||
if (pxreq.status != 200 && size == "original") {
|
||||
res.header("X-Using-Backup", '1');
|
||||
pxreq = await fetch(`https://39.hmbp.gq/https://www.pixiv.net/en/artworks/${id}?noredirect`);
|
||||
}
|
||||
|
||||
res.status(pxreq.status);
|
||||
res.status(203);
|
||||
res.type(pxreq.headers.get("Content-Type"));
|
||||
res.header("Content-Disposition", `filename=${url.split('/').pop()}`);
|
||||
res.header("X-Pixiv-Id", id);
|
||||
|
663
package-lock.json
generated
663
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user