Auth gate
Read the session cookie. Redirect signed-out users away from protected paths and signed-in users away from /login.
Geolocation routing
Vercel exposes request.geo with country / region / city. Redirect to a locale-specific path on first hit.
A/B test bucketing
Set a cookie on first visit picking a variant. Subsequent requests read the cookie and route accordingly. The bucket survives navigation without server state.
Header rewriting
Add security headers, request IDs, or feature-flag headers that downstream code can read.