add_custom_header_to_request
Add custom HTTP headers to matching requests before they are sent, using URL patterns and simple parameters. Configure header name, value, and optional tab to target specific requests.
Instructions
Add a custom header to matching requests before sending. Simpler alternative to intercept_and_modify_traffic with flat parameters.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tabId | No | Tab ID (optional) | |
| headerName | Yes | Name of header to add (e.g., "X-Custom-Header") | |
| urlPattern | Yes | URL pattern to intercept (e.g., "*api*", "*.json") | |
| headerValue | Yes | Value of header (e.g., "test-value") | |
| navigateUrl | No | URL to navigate to (if action is navigate) | |
| clickSelector | No | CSS selector of element to click (if action is click) |