Vercel Edge Middleware examples
Browse examples of how to use and apply Vercel Edge Middleware.

By A/B testing at the edge, you'll reduce CLS from client-loaded experiments and improve your site's performance with smaller JS bundles.

Password protect pages in your application using Edge Middleware.

See how Vercel's Skew Protection feature enables production-ready blue-green deployments with just a few lines of code.

Botd is a browser library for bot detection. In this template we'll be using it alongside botd-integrations for bot detection at the edge.

DataDome can provide real-time bot protection and other security protections to any website. In this template we'll be using it at the edge.

Read and write cookies directly at the edge.

Learn to add response headers at the edge.

Learn how to filter query params in Edge Middleware.

Learn how to use visitor's location at the edge.

This template shows how to redirect users based on i18n configuration.

Learn to add/update/delete request headers in a middleware.

Learn how to render a different page based on the User-Agent header.