diff --git a/src/client/shared/requests/beacon.ts b/src/client/shared/requests/beacon.ts index f758521..6158463 100644 --- a/src/client/shared/requests/beacon.ts +++ b/src/client/shared/requests/beacon.ts @@ -2,7 +2,7 @@ import { rewriteUrl } from "../../../shared"; import { ScramjetClient } from "../../client"; export default function (client: ScramjetClient, self) { - client.Proxy("navigator.sendBeacon", { + client.Proxy("Navigator.prototype.sendBeacon", { apply(ctx) { ctx.args[0] = rewriteUrl(ctx.args[0], client.meta); }, diff --git a/src/client/shared/requests/fetch.ts b/src/client/shared/requests/fetch.ts index db056d1..a395342 100644 --- a/src/client/shared/requests/fetch.ts +++ b/src/client/shared/requests/fetch.ts @@ -16,12 +16,6 @@ export default function (client: ScramjetClient, _self: typeof globalThis) { }, }); - // client.Proxy("Headers", { - // construct(ctx) { - // ctx.args[0] = rewriteHeaders(ctx.args[0]); - // }, - // }); - client.Proxy("Request", { construct(ctx) { if (typeof ctx.args[0] === "string" || ctx.args[0] instanceof URL) { @@ -43,10 +37,4 @@ export default function (client: ScramjetClient, _self: typeof globalThis) { return unrewriteUrl(ctx.get() as string); }, }); - - // client.Proxy("Response.redirect", { - // apply(ctx) { - // ctx.args[0] = encodeUrl(ctx.args[0]); - // }, - // }); } diff --git a/src/controller/index.ts b/src/controller/index.ts index c307354..0c2e9d3 100644 --- a/src/controller/index.ts +++ b/src/controller/index.ts @@ -30,7 +30,7 @@ export class ScramjetController { serviceworkers: false, naiiveRewriter: false, captureErrors: true, - strictRewrites: false, + strictRewrites: true, syncxhr: false, cleanerrors: false, scramitize: false,