From 6e451eee7f4cfe3c83c369b33ed7b8014f167803 Mon Sep 17 00:00:00 2001 From: Percs <83934299+Percslol@users.noreply.github.com> Date: Mon, 24 Feb 2025 23:13:01 -0600 Subject: [PATCH] fix: (somewhat) amazon search --- src/worker/fetch.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/worker/fetch.ts b/src/worker/fetch.ts index 56a464c..2310682 100644 --- a/src/worker/fetch.ts +++ b/src/worker/fetch.ts @@ -30,14 +30,6 @@ export async function handleFetch( request: Request, client: Client | null ) { - const urlParam = new URLSearchParams(new URL(request.url).search); - - if (urlParam.has("url")) { - return Response.redirect( - rewriteUrl(urlParam.get("url"), newmeta(new URL(urlParam.get("url")))) - ); - } - try { const requesturl = new URL(request.url); let workertype = ""; @@ -122,7 +114,7 @@ export async function handleFetch( if ( activeWorker && activeWorker.connected && - urlParam.get("from") !== "swruntime" + requesturl.searchParams.get("from") !== "swruntime" ) { // TODO: check scope const r = await activeWorker.fetch(request);