1
0
Fork 0
forked from OpenNeo/impress

use head request for loading image hash

This commit is contained in:
Steve C 2026-01-03 21:16:21 -05:00
parent 1cef0bea20
commit 91b9c91520

View file

@ -60,6 +60,7 @@ const PETS_CP_URL_PATTERN =
/https?:\/\/pets\.neopets\.com\/cp\/([a-z0-9]+)\/[0-9]+\/[0-9]+\.png/;
async function loadImageHashFromPetName(petName) {
const res = await fetch(`https://pets.neopets.com/cpn/${petName}/1/1.png`, {
method: "HEAD",
redirect: "manual",
});
if (res.status !== 302) {