> Meticulous records real user sessions from a web app and replays them against each commit to catch visual regressions.
>
> Full AI-readable docs index (complete project setup journey + every page as markdown): https://app.meticulous.ai/llms.txt

# Blocking Requests During Replay

Meticulous automatically stubs network requests during replay to ensure deterministic test results. However, some third-party scripts and services may still cause non-determinism by executing outside of the normal request flow (e.g. via service workers, WebSockets, or inline script tags).

You can configure **blocked request patterns** to abort these requests during replay, preventing them from interfering with your tests.

## When to use blocked requests

Use blocked requests when a third-party service causes flaky diffs or non-deterministic behavior during replay. Common examples include:

- **Analytics and tracking scripts** (e.g. Segment, Amplitude, Google Analytics)
- **Error monitoring** (e.g. Sentry, Datadog, LogRocket)
- **Payment processors** (e.g. Stripe)
- **CAPTCHAs** (e.g. reCAPTCHA, hCaptcha)
- **Chat widgets** (e.g. Intercom, Zendesk)
- **Ad scripts**

## Configuring blocked requests

1. Navigate to your project's **Settings** page.
2. Scroll to the **Blocked Requests** section.
3. Click **Add Entry** to add a new pattern.
4. Fill in one or more of the following fields:
   - **Root Domain**: Match requests to a specific domain (e.g. `stripe.com`). This matches the domain and all of its subdomains.
   - **Resource Type**: Filter by the type of resource being requested (e.g. Script, Document, Image).
   - **URL Regex**: A regular expression to match against the full request URL. Use this for more granular control.
5. Click **Save Changes**.

You can combine multiple fields in a single entry to create more specific rules. For example, setting both a root domain and a resource type will only block requests that match both conditions.

## How matching works

A request is blocked if it matches **any** of the entries in your blocked requests list. Within a single entry, **all** specified fields must match:

- **Root Domain**: The request URL's hostname must be the domain itself or a subdomain of it. For example, `stripe.com` matches `js.stripe.com` and `api.stripe.com`.
- **Resource Type**: The request's resource type must exactly match (e.g. `script`, `fetch`, `xhr`).
- **URL Regex**: The regular expression must match somewhere in the full request URL. The regex is tested against the complete URL string.

  ### Where can I reach out for support?

  Reach out to [support@meticulous.ai](mailto:support@meticulous.ai) and we'll be happy to help.
