Verified Commit 87bf73f9 authored by Thomas Rientjes's avatar Thomas Rientjes
Browse files

Fix #227 by revising request sanitation logic

parent 51183abe
......@@ -262,8 +262,14 @@ chrome.webRequest.onBeforeRedirect.addListener(function (requestDetails) {
}, {'urls': [Address.ANY]});
chrome.webRequest.onBeforeSendHeaders.addListener(stateManager._stripMetadata, {
'urls': stateManager.validHosts
}, [WebRequest.BLOCKING, WebRequest.HEADERS]);
chrome.storage.local.get({'stripMetadata': true}, function (options) {
if (options === null || options.stripMetadata !== false) {
chrome.webRequest.onBeforeSendHeaders.addListener(stateManager._stripMetadata, {
'urls': stateManager.validHosts
}, [WebRequest.BLOCKING, WebRequest.HEADERS]);
}
});
chrome.storage.onChanged.addListener(stateManager._handleStorageChanged);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment