Documentation Index
Fetch the complete documentation index at: https://docs.esperr.com/llms.txt
Use this file to discover all available pages before exploring further.
What you’ll need
- A deployed Esper API that your Vercel deployment can reach.
- An Esper tenant for the Vercel application you want to protect.
- An Esper API key for that tenant, stored as a Vercel environment variable.
- At least one mitigation and policy in Esper.
- If you want managed challenge redirects, a challenge mitigation with a default return URL template already configured.
- Middleware or edge-route coverage for the paths you want Esper to evaluate.
Recipe PathThis guide corresponds to
recipes/vercel.What this integration does
The Vercel middleware accepts the incoming request, asks Esper for one runtime decision, and then either:- allows the request to continue
- redirects the request into an Esper-managed challenge
- returns a block response immediately
Environment variables
ESPER_API_KEY
Deploy
Current runtime behavior
allow: continue to your normal Vercel app route or API handler.challenge: redirect immediately to Esper’s returnedredirect_url.block: return the deny response immediately.
Challenge redirects
Sendreturn_url: request.url with each runtime mitigation request. This is the
original URL the visitor requested, and Esper stores it on the challenge session
so a successful challenge can return the visitor to the protected page. The
mitigation’s default return URL template is only a fallback when the integration
does not provide a per-request return_url.