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:
parent
bb90f92a06
commit
8e269df3c1
1 changed files with 5 additions and 1 deletions
|
@ -161,7 +161,11 @@ export function safeImageUrl(
|
||||||
archiveUrl.search = new URLSearchParams({ url: url.toString() });
|
archiveUrl.search = new URLSearchParams({ url: url.toString() });
|
||||||
url = archiveUrl;
|
url = archiveUrl;
|
||||||
} else if (crossOrigin) {
|
} 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 (
|
} else if (
|
||||||
url.origin === "http://pets.neopets.com" ||
|
url.origin === "http://pets.neopets.com" ||
|
||||||
|
|
Loading…
Reference in a new issue