mirror of
https://github.com/withastro/astro.git
synced 2025-01-06 22:10:10 -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;
|
let inputBuffer: ArrayBuffer | undefined = undefined;
|
||||||
|
|
||||||
const isRemoteImage = isRemotePath(transform.src);
|
const isRemoteImage = isRemotePath(transform.src);
|
||||||
const sourceUrl = isRemoteImage
|
const sourceUrl = isRemoteImage ? new URL(transform.src) : new URL(transform.src, url.origin);
|
||||||
? new URL(transform.src)
|
|
||||||
: new URL(transform.src, url.origin);
|
|
||||||
|
|
||||||
if (isRemoteImage && isRemoteAllowed(transform.src, imageConfig) === false) {
|
if (isRemoteImage && isRemoteAllowed(transform.src, imageConfig) === false) {
|
||||||
return new Response('Forbidden', { status: 403 });
|
return new Response('Forbidden', { status: 403 });
|
||||||
|
|
Loading…
Reference in a new issue