0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

[ci] format

This commit is contained in:
Erika 2024-04-15 09:07:35 +00:00 committed by astrobot-houston
parent 0684312145
commit af1af9faee

View file

@ -45,9 +45,7 @@ export const GET: APIRoute = async ({ request }) => {
let inputBuffer: ArrayBuffer | undefined = undefined;
const isRemoteImage = isRemotePath(transform.src);
const sourceUrl = isRemoteImage
? new URL(transform.src)
: new URL(transform.src, url.origin);
const sourceUrl = isRemoteImage ? new URL(transform.src) : new URL(transform.src, url.origin);
if (isRemoteImage && isRemoteAllowed(transform.src, imageConfig) === false) {
return new Response('Forbidden', { status: 403 });