mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
[ci] format
This commit is contained in:
parent
0684312145
commit
af1af9faee
1 changed files with 1 additions and 3 deletions
|
@ -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 });
|
||||
|
|
Loading…
Reference in a new issue