> ## Documentation Index
> Fetch the complete documentation index at: https://momentic.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Test Vercel protected preview environments

> Bypass Vercel's authentication wall using a protection bypass secret.

<Info>
  **Prerequisite**: A Vercel [protection bypass
  secret](https://vercel.com/docs/security/deployment-protection/methods-to-bypass-deployment-protection/protection-bypass-automation).
</Info>

Two methods: headers (fast, but blocked by CORS on some apps) or query
parameters (work even when CORS blocks headers).

## Option A: Headers

In the test's **Network options**, add:

| Header                       | Value           |
| ---------------------------- | --------------- |
| `x-vercel-protection-bypass` | `<your-secret>` |
| `x-vercel-set-bypass-cookie` | `true`          |

<Warning>
  These headers are sent with **every** request in the session, including
  third-party script requests. If you see CORS errors, use query parameters
  instead.
</Warning>

## Option B: Query parameters

Override the base URL in the test's **General options**:

```
https://your-preview.vercel.app?x-vercel-protection-bypass=<secret>&x-vercel-set-bypass-cookie=true
```

Vercel sets the bypass as a cookie for the rest of the session, so subsequent
requests don't need the query string.

## Related

* [Vercel docs: Protection bypass automation](https://vercel.com/docs/security/deployment-protection/methods-to-bypass-deployment-protection/protection-bypass-automation)
