Why are all sites blocked when I use declarativeNetRequest.updateDynamicRules

Viewed 14

I need to block some http requests with new manifest v3. I try to use declarativeNetRequest.updateDynamicRules, but any rule blocks all requests, and I can't open any site. For example https://developer.chrome.com.

Code example:

chrome.declarativeNetRequest.updateDynamicRules({
   removeRuleIds: [232],
   addRules: [{
     id: 232,
     "condition": { "urlFilter": "analytics", "resourceTypes": ["main_frame"] },
     action: {
       "type": "block",

     },
   }]
});

Can somebody help me?)

0 Answers
Related