mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-15 07:20:02 -04:00
fix: incorrectly classified xhr requests as sync
This commit is contained in:
parent
9398cf78be
commit
a3a8eba0ec
1 changed files with 1 additions and 0 deletions
|
@ -15,6 +15,7 @@ export default function (client: ScramjetClient, self: Self) {
|
||||||
client.Proxy("XMLHttpRequest.prototype.open", {
|
client.Proxy("XMLHttpRequest.prototype.open", {
|
||||||
apply(ctx) {
|
apply(ctx) {
|
||||||
if (ctx.args[1]) ctx.args[1] = rewriteUrl(ctx.args[1], client.meta);
|
if (ctx.args[1]) ctx.args[1] = rewriteUrl(ctx.args[1], client.meta);
|
||||||
|
if (ctx.args[2] === undefined) ctx.args[2] = true;
|
||||||
ctx.this[ARGS] = ctx.args;
|
ctx.this[ARGS] = ctx.args;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue