declarative_net_request

Type Object
Mandatory No
Manifest version 2
Example
"declarative_net_request" : {
  "rule_resources" : [{
    "id": "ruleset",
    "enabled": true,
    "path": "rules.json"
  }]
}

Specify static rulesets for use with declarativeNetRequest.

Syntax

The "declarative_net_request" key is an object that must contain the "rule_resources" property, an array that must include at least one object with these properties:

Name Type Description
"id" String A non-empty string uniquely identifying the ruleset. IDs beginning with '_' are reserved for internal use.
"enabled" Boolean Whether the ruleset is enabled by default.
"path" String The path of the JSON ruleset relative to the extension directory. See the Rules section of the `declarativeNetRequest` API for information on the content of the ruleset JSON file.

Example

"declarative_net_request" : {
  "rule_resources" : [{
    "id": "ruleset_1",
    "enabled": true,
    "path": "rules_1.json"
  }, {
    "id": "ruleset_2",
    "enabled": false,
    "path": "rules_2.json"
  }]
}

Browser compatibility

BCD tables only load in the browser