fixes #160
This commit is contained in:
parent
4d968b7bc5
commit
7bfa6be62c
1 changed files with 9 additions and 4 deletions
|
@ -553,14 +553,19 @@ const onBeforeSendHeaders = d => {
|
||||||
i < requestHeaders.length;
|
i < requestHeaders.length;
|
||||||
i += 1, name = (requestHeaders[i] || {}).name
|
i += 1, name = (requestHeaders[i] || {}).name
|
||||||
) {
|
) {
|
||||||
if (name === 'User-Agent' || name === 'user-agent') {
|
name = name.toLowerCase();
|
||||||
|
if (name === 'user-agent') {
|
||||||
requestHeaders[i].value = str === 'empty' ? '' : str;
|
requestHeaders[i].value = str === 'empty' ? '' : str;
|
||||||
|
}
|
||||||
|
// https://github.com/ray-lothian/UserAgent-Switcher/issues/160
|
||||||
|
else if (name.startsWith('sec-ch-')) {
|
||||||
|
requestHeaders[i] = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
requestHeaders
|
requestHeaders: requestHeaders.filter(a => a)
|
||||||
};
|
};
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const onCommitted = d => {
|
const onCommitted = d => {
|
||||||
|
|
Loading…
Reference in a new issue