Skip to content

Commit

Permalink
fix searchParams
Browse files Browse the repository at this point in the history
  • Loading branch information
seadfeng committed Aug 21, 2024
1 parent 4d7f296 commit 4428eab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/download/[...url]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4428eab

Please sign in to comment.