diff --git a/src/app/download/[...url]/route.ts b/src/app/download/[...url]/route.ts index 559abff..8d48c0e 100644 --- a/src/app/download/[...url]/route.ts +++ b/src/app/download/[...url]/route.ts @@ -5,7 +5,8 @@ export async function GET(request: NextRequest) { nextUrl.searchParams.delete("url"); let search = nextUrl.searchParams.toString(); if (search) search = `?${search}`; - const url = `${nextUrl.pathname}${search}`; + const url = `${nextUrl.pathname}${search}`.split(`/download/`)[1]; + let parsedUrl: URL; try { parsedUrl = new URL(url);