Oh wow, don't use the images.neopets.com asset proxy anymore either!

Huh, I was writing up an API inventory doc to send to TNT, and was
gonna explain why we proxy these assets… but turns out we don't need to
anymore! Nice!

This is a bit fragile if they ever change their headers, so I'll
mention that in the doc, but for now, yeah sure let's save the planet
some computational effort!
This commit is contained in:
Emi Matchu 2024-04-06 03:38:23 -07:00
parent bb90f92a06
commit 8e269df3c1

View file

@ -161,7 +161,11 @@ export function safeImageUrl(
archiveUrl.search = new URLSearchParams({ url: url.toString() });
url = archiveUrl;
} else if (crossOrigin) {
url.host = "images.neopets-asset-proxy.openneo.net";
// NOTE: Previously we would rewrite this to our proxy that adds an
// `Access-Control-Allow-Origin` header (images.neopets-asset-proxy.
// openneo.net), but images.neopets.com now includes this header for us!
//
// So, do nothing!
}
} else if (
url.origin === "http://pets.neopets.com" ||