Do not add network filters in adblocker cache to fix session enhancing

This commit is contained in:
TC
2021-06-27 20:42:39 +02:00
parent e5ab50cebd
commit a9a5d99676

View File

@ -33,7 +33,17 @@ const loadAdBlockerEngine = (
...additionalBlockLists,
];
ElectronBlocker.fromLists(fetch, lists, {}, cachingOptions)
ElectronBlocker.fromLists(
fetch,
lists,
{
// when generating the engine for caching, do not load network filters
// So that enhancing the session works as expected
// Allowing to define multiple webRequest listeners
loadNetworkFilters: session !== undefined,
},
cachingOptions
)
.then((blocker) => {
if (session) {
blocker.enableBlockingInSession(session);