Improved: Method to remove metadata (#179)
This commit is contained in:
parent
602cde94b6
commit
87a65a8687
|
@ -53,14 +53,10 @@ requestSanitizer._stripMetadata = function (requestDetails) {
|
|||
allowlistedDomains = stateManager._domainIsListed(initiatorDomain);
|
||||
|
||||
if (allowlistedDomains) {
|
||||
return {
|
||||
[WebRequest.HEADERS]: requestDetails.requestHeaders,
|
||||
};
|
||||
}
|
||||
|
||||
for (let i = 0; i < requestDetails.requestHeaders.length; ++i) {
|
||||
if (sensitiveHeaders.indexOf(requestDetails.requestHeaders[i].name) > -1) {
|
||||
requestDetails.requestHeaders.splice(i--, 1);
|
||||
for (let i = 0; i < requestDetails.requestHeaders.length; ++i) {
|
||||
if (sensitiveHeaders.indexOf(requestDetails.requestHeaders[i].name) > -1) {
|
||||
requestDetails.requestHeaders.splice(i--, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue