Skip to content
HTML/CSS to ImageDocs

Block browser requests with request_overrides

Copy page

Use the new request_overrides parameter to block selected network requests while Chrome renders an HTML/CSS image, URL screenshot, or template. Match a request by URL pattern, browser resource type, or both. For example, this rule blocks scripts from an analytics host:

{
"request_overrides": [
{
"action": "block",
"url": "*://analytics.example.com/*",
"resource_types": ["script"]
}
]
}

You can also set rules in an HTML/CSS Open Graph configuration’s default_options. The parameter guide explains wildcard matching, supported resource types, limits, and request formats. Signed create-and-render URLs do not support this parameter.

The official TypeScript, Go, Python, PHP, Ruby, and .NET clients have been updated to accept request_overrides, including resource type values that serialize to the API’s strings.

The Terraform provider v0.2.1 and Pulumi provider v0.2.0 also support request override rules for images, templates, and Open Graph default options. See the Terraform guide and Pulumi guide for setup.

All updates