mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 06:50:01 -04:00
fix: turn on strict rewrites by default
This commit is contained in:
parent
5f70c1c0ac
commit
c34d0a07e1
3 changed files with 2 additions and 14 deletions
|
@ -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);
|
||||
},
|
||||
|
|
|
@ -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]);
|
||||
// },
|
||||
// });
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ export class ScramjetController {
|
|||
serviceworkers: false,
|
||||
naiiveRewriter: false,
|
||||
captureErrors: true,
|
||||
strictRewrites: false,
|
||||
strictRewrites: true,
|
||||
syncxhr: false,
|
||||
cleanerrors: false,
|
||||
scramitize: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue