mirror of
https://codeberg.org/LibRedirect/libredirect.git
synced 2025-01-26 17:24:58 +01:00
Fixed bug with responseHeaders #135
This commit is contained in:
parent
3e44649133
commit
94c6450401
@ -194,8 +194,12 @@ function removeXFrameOptions(e) {
|
||||
...nitterTorCustomRedirects,
|
||||
];
|
||||
if (!twitterList.includes(protocolHost) && e.type != 'sub_frame') return;
|
||||
for (const i in e.responseHeaders) if (e.responseHeaders[i].name = 'x-frame-options') e.responseHeaders.splice(i, 1);
|
||||
return { responseHeaders: e.responseHeaders };
|
||||
let isChanged = false;
|
||||
for (const i in e.responseHeaders) if (e.responseHeaders[i].name = 'x-frame-options') {
|
||||
isChanged = true;
|
||||
e.responseHeaders.splice(i, 1);
|
||||
}
|
||||
if (isChanged) return { responseHeaders: e.responseHeaders };
|
||||
}
|
||||
|
||||
function isNitter(url, type) {
|
||||
|
Loading…
Reference in New Issue
Block a user