browser_mock_route
Intercept network requests by URL pattern to block resources like images or ads, or mock API responses with custom status and body.
Instructions
Intercepts and mocks/blocks network requests matching a URL pattern (e.g. blocking images/ads, or mocking responses).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action to perform: 'abort' blocks/cancels the request, 'mock' responds with custom status/body. | |
| mockBody | No | Optional response body for mocked responses. | |
| mockStatus | No | Optional HTTP status code for mocked responses. Defaults to 200. | |
| urlPattern | Yes | A glob or regex pattern of URLs to intercept (e.g. '**/*.{png,jpg,jpeg,gif}' or '**/api/v1/data'). |