mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
Fix soft regression in scriptlets proxying fetch()
Related commit: https://github.com/gorhill/uBlock/commit/13612d1d29 Related issue: https://github.com/uBlockOrigin/uAssets/issues/30158
This commit is contained in:
parent
abe9cdbef7
commit
cbf24a40b6
1 changed files with 7 additions and 2 deletions
|
|
@ -67,7 +67,7 @@ export function collateFetchArgumentsFn(resource, options) {
|
|||
const props = [
|
||||
'body', 'cache', 'credentials', 'duplex', 'headers',
|
||||
'integrity', 'keepalive', 'method', 'mode', 'priority',
|
||||
'redirect', 'referrer', 'referrerPolicy', 'signal', 'url'
|
||||
'redirect', 'referrer', 'referrerPolicy', 'url'
|
||||
];
|
||||
const out = {};
|
||||
if ( collateFetchArgumentsFn.collateKnownProps === undefined ) {
|
||||
|
|
@ -84,7 +84,12 @@ export function collateFetchArgumentsFn(resource, options) {
|
|||
) {
|
||||
out.url = `${resource}`;
|
||||
} else {
|
||||
collateFetchArgumentsFn.collateKnownProps(resource, out);
|
||||
let clone;
|
||||
try {
|
||||
clone = safe.Request_clone.call(resource);
|
||||
} catch {
|
||||
}
|
||||
collateFetchArgumentsFn.collateKnownProps(clone || resource, out);
|
||||
}
|
||||
if ( typeof options === 'object' && options !== null ) {
|
||||
collateFetchArgumentsFn.collateKnownProps(options, out);
|
||||
|
|
|
|||
Loading…
Reference in a new issue