Skip to content

Commit

Permalink
fix: (somewhat) amazon search
Browse files Browse the repository at this point in the history
  • Loading branch information
Percslol committed Feb 25, 2025
1 parent 6ec1fc8 commit 6e451ee
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/worker/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "";
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 6e451ee

Please sign in to comment.