Search e01
One query across the encyclopedia, books, dictionary, papers, Wikidata and the developer library. Every hit carries its source.
4 results across 6 corpora for declarativeNetRequest.ModifyHeaderInfo.
Developer library 4
Intercept HTTP requests
Two APIs are available for intercepting HTTP requests: webRequest and declarativeNetRequest. The webRequest API intercepts requests by adding event listeners to the various stages of an HTTP request. The extension's listeners can inspect and modify requests programmatically: getting access to request and response headers and bodies, canceling requests, and redirecting them. Use `webRequest` when your extension needs
declarativeNetRequest
e and modify network requests without notifying extensions about individual network requests. ## Permissions To use this API, an extension must request the `"declarativeNetRequest"` or `"declarativeNetRequestWithHostAccess"` [permission](/docs/Mozilla/Add-ons/WebExtensions/manifest.json/permissions) in its [`manifest.json`](/docs/Mozilla/Add-ons/WebExtensions/manifest.json) file. The `"declarativeNetRequest"` permi
declarativeNetRequest.RuleAction
Details of the action to take if a rule is matched, as the `action` property of a declarativeNetRequest.Rule. ## Type Values of this type are objects. They contain these properties: - `redirect` - : declarativeNetRequest.Redirect. Describes how the redirect should be performed. Only valid for redirect rules. - `requestHeaders` - : declarativeNetRequest.ModifyHeaderInfo. The request headers to modify for the
declarativeNetRequest.ModifyHeaderInfo
d in the `rule.action.requestHeaders` array or `rule.action.responseHeaders` array for rules whose [`rule.action.type`](/docs/Mozilla/Add-ons/WebExtensions/API/declarativeNetRequest/RuleAction#type_2) is "modifyHeaders". Each object describes one header modification. To modify multiple headers, multiple objects can be specified in these arrays, or across multiple rules. Matching `modifyHeaders` rules are applied in