0

I am trying to create a Chrome extension using manifest v3, but the chrome.webRequest API is no longer available with the blocking option. This makes it difficult to block or modify network requests in my extension. I want to modify my extension code to work with manifest v3 and find alternative APIs that can achieve similar functionality. I am seeking guidance on how to modify my extension and what alternative APIs to use instead of chrome.webRequest. Any help would be greatly appreciated

I modified my extension code to work with manifest v3 by using the declarativeNetRequest API instead of chrome.webRequest. However, I encountered errors related to the limited number of rules that can be set, and the inability to modify request headers. Also, the declarativeNetRequest API does not support the blocking of requests based on the request body.

Krishnox
  • 1
  • 1
  • 1
    There may be no adequate replacement because ManifestV3 implemented only a very small subset of webRequestBlocking use cases. Show your MV2 code, maybe there's a workaround. The only full solution is to use chrome.debugger API (slower, more dangerous) or install the extension in forced mode via policies which enables webRequestBlocking. There's also Chrome-Developer-Mode-Extension-Warning-Patcher. – wOxxOm Mar 19 '23 at 21:16

0 Answers0