i am working on a chrome extension that changes headers (adds custom Accept-Language header) and connects to pre-specified proxies. I was testing my product and found out that when i add some custom headers, they are only sent/changed if i use http.…
I am trying to write an extension in Manifest Version 3, where I want to modify cookie headers for certain requests. Since the rule will only be applied to specific requests that meets my conditions,
I thought of adding a dynamic rule temporarily…
The new manifest version 3 of Chrome extension API offers a new function setExtensionActionOptions which allows a typical content blocker to display the number of blocked HTTP requests for a particular tab. The question is: when to call this API?…
I am in the process of migrating from Manifest V2 to V3, from Web Request API to Declarative Net Request API. Using Web Request, I modify the "content-security-policy" header by adding a domain into the list of various directives (default-src,…
I'm making a Chrome extension from redirecting youtube.com/shorts/... to youtube.com/watch?v=...
Everything works fine when I open those shorts links in new tabs or when I type them out but when I click from the homepage itself, they don't get…
I am trying to explore on inspecting request headers using declarativeNetRequest in chrome MV3, is there any sample or documentation to achieve this.(we need to just inspect the headers for logging purpose not block or modify etc).
I developed a Chrome extension that allows me to edit cookie names before each request and after each response in order to manage different sessions on different Chrome tabs (basically, something akin to Firefox containers).
I want to start porting…
Scenario: Browser -> proxyurl.com -> target.com
Is it possible to modify the headers sent to the proxy?
It appears that the urlFilter refers to the target.com.
const removeRuleIds = [1];
const addRules = [
{
id: 1,
priority: 1,
action:…
I'm trying to write a Chrome extension that automatically updates the search query section of the URL for search engine requests.
I would like my extension to read search engine requests using onBeforeRequest and create a new URL with my updates.…
I am using the getDynamicRules method for my chrome extension to see what rules are currently applied, I can get the rules to show in the method like below:
chrome.declarativeNetRequest.getDynamicRules(rules => {
console.log(rules);
})
but I…
I am working on manifest version 3 and stuck in an endless loophole for getting the response body by requested API in the chrome extension.
Goal is to have all requested API response
here's the code.
manifest.json
{
"name": "Chapter 28 (MV3)",
…
I'm trying to remove a single rule from dynamic rules of declarativeNetRequest of chrome with this code:
const unblockHost = (clickData) => {
chrome.declarativeNetRequest.updateDynamicRules({
removeRuleIds: bannedHosts.map( (h, i) => {
…
With webRequest in was quite easy to do:
chrome.webRequest.onBeforeSendHeaders.addListener(this.addTabIdToHeader({ tabId }), { urls: ['http://*/*'] }, ['blocking', 'requestHeaders']);
Now in declarativeNetRequest there is no current tab id
…
I am creating dynamic rules for declarativeNetRequest and passing the below data in updateDynamicRules api, I saw that these rules are only getting applied on doc type of request (refer image) and not on other requests, whereas this should work on…