mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-13 22:40:01 -04:00
fix xmlhttprequest.setRequestHeader proxy
This commit is contained in:
parent
5b40885c02
commit
31d8b6a650
1 changed files with 2 additions and 2 deletions
|
@ -8,10 +8,10 @@ XMLHttpRequest.prototype.open = new Proxy(XMLHttpRequest.prototype.open, {
|
|||
|
||||
XMLHttpRequest.prototype.setRequestHeader = new Proxy(XMLHttpRequest.prototype.setRequestHeader, {
|
||||
apply(target, thisArg, argArray) {
|
||||
let headerObject = Object.fromEntries(argArray);
|
||||
let headerObject = Object.fromEntries([argArray]);
|
||||
headerObject = self.__scramjet$bundle.rewriters.rewriteHeaders(headerObject);
|
||||
|
||||
argArray = Object.entries(headerObject);
|
||||
argArray = Object.entries(headerObject)[0];
|
||||
|
||||
return Reflect.apply(target, thisArg, argArray);
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue