network_rules
Intercept browser network traffic to block requests, redirect URLs, modify request headers, or stub responses with synthetic bodies. Rules persist across reloads until explicitly cleared.
Instructions
Network interception, browser-wide, survives reloads until cleared: block requests, redirect URLs, set/remove request headers, or stub responses with a synthetic body (served by a local helper; from HTTPS pages the stub host must be trustworthy).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Response body (action=stub) | |
| action | Yes | list and clear inspect and drop the rules already installed | |
| header | No | Header name for action=modify_header, e.g. "User-Agent" | |
| status | No | action=stub | |
| url_filter | No | declarativeNetRequest urlFilter, e.g. "||example.com/api/*" | |
| content_type | No | action=stub | application/json |
| header_value | No | Omit to remove header | |
| redirect_url | No | Destination for action=redirect | |
| header_target | No | response = strip content-security-policy / x-frame-options, inject CORS | request |
| resource_types | No | Limit the rule to these request types; omitted = all of them |