Skip to content
Agent Stack
  • AI SDK
  • AI Gateway
  • Sandbox
  • Passport
  • Connect
  • eve
Core Platform
  • Build and deploy
  • Vercel CI
  • Fluid Compute
  • Content Delivery
  • Observability
  • Workflows
  • Security
Tools
  • Next.js
  • Vercel Agent
  • Vercel Plugin
  • Open Source
  • Domains↗
  • v0↗
Learn
  • Docs
  • About
  • Blog
  • Changelog
  • Knowledge Base
Build
  • AI Apps
  • Web Apps
  • Marketing Sites
  • Platforms
  • Commerce
Explore
  • Customers
  • Marketplace
  • Partner Finder
  • AWS
  • Community↗
EnterprisePricing
Contact
Log InSign Up
Dashboard

Products
Agent Stack
  • AI SDK
  • AI Gateway
  • Sandbox
  • Passport
  • Connect
  • eve
Core Platform
  • Build and deploy
  • Vercel CI
  • Fluid Compute
  • Content Delivery
  • Observability
  • Workflows
  • Security
Tools
  • Next.js
  • Vercel Agent
  • Vercel Plugin
  • Open Source
  • Domains↗
  • v0↗
Resources
Learn
  • Docs
  • About
  • Blog
  • Changelog
  • Knowledge Base
Build
  • AI Apps
  • Web Apps
  • Marketing Sites
  • Platforms
  • Commerce
Explore
  • Customers
  • Marketplace
  • Partner Finder
  • AWS
  • Community↗
Enterprise
Pricing
Sign UpLog In
Contact

Vercel Edge Middleware examples

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

Agent Stack

  • AI SDK
  • AI Gateway
  • Sandbox
  • Workflows
  • ConnectNew
  • PassportNew
  • eveNew

Core Platform

  • Build and deploy
  • Vercel CINew
  • Fluid Compute
  • Content Delivery
  • Observability

Security

  • Platform Security
  • WAF
  • Bot Management
  • BotID

Tools

  • Vercel Drop
  • Vercel Agent
  • Vercel Plugin
  • Agent Skills
  • Domains
  • v0

Frameworks

  • eveNew
  • Next.js
  • Nuxt
  • SvelteKit
  • Nitro
  • Turborepo
  • Tanstack Start
  • FastAPI
  • All frameworks

SDKs

  • Vercel SDK
  • Workflow SDK
  • Flags SDK
  • Chat SDK
  • Queues SDK
  • Streamdown

Build

  • AI Apps
  • Web Apps
  • Marketing Sites
  • Platforms
  • Commerce
  • Platform Engineers
  • Design Engineers

Learn

  • Docs
  • Blog
  • Changelog
  • Knowledge Base
  • Academy
  • Articles
  • Community
  • Is Agentic

Explore

  • Customers
  • Marketplace
  • Templates
  • Partner Finder
  • Vercel + AWS

Company

  • About
  • Careers
  • Press
  • Events
  • Startups
  • Shipped on Vercel
  • Open Source Program
  • Enterprise
  • Pricing
  • Help

Legal & Trust

  • Privacy Policy
  • Terms of Service
  • Cookie Policy
  • DPA
  • Acceptable Use Policy
  • Legal (all documents)
  • Trust Center
  • Status

Social

  • GitHub
  • X
  • LinkedIn
  • YouTube
  • Instagram
  • VercelVercel

Loading status…

Select a display theme:

Templates Gallery

  • Edge Redirects with Upstash thumbnail

    Edge Redirects with Upstash

    Redirect from a list of redirects both hardcoded and coming from Upstash (Redis), that get evaluated at the edge.

  • Modifying Request Headers in Middleware thumbnail

    Modifying Request Headers in Middleware

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

  • A/B Testing Simple thumbnail

    A/B Testing Simple

    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.

  • Filtering Query Parameters thumbnail

    Filtering Query Parameters

    Learn how to filter query params in Edge Middleware.

  • Rewriting at the Edge using Upstash thumbnail

    Rewriting at the Edge using Upstash

    Learn how to avoid calling several services by pre-checking stock at the edge using a redis cache.

  • Bot Protection with DataDome thumbnail

    Bot Protection with DataDome

    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.

  • Power Parity Pricing Strategies thumbnail

    Power Parity Pricing Strategies

    Shows the differences between doing PPP at the edge using information from the geolocation object, Node.js SSR, and client-side rendering.

  • Hostname Rewrites using Edge Middleware thumbnail

    Hostname Rewrites using Edge Middleware

    Learn how to programmatically create unique content pages for your users with a multi-tenant infrastructure using Edge Middleware.

  • IP Blocking with DataDome thumbnail

    IP Blocking with DataDome

    DataDome can provide real-time bot protection, ip blocking, custom rules protection and other security protections to any website.

  • Adding Cookies thumbnail

    Adding Cookies

    Read and write cookies directly at the edge.

  • Vercel Edge Middleware Rate Limit thumbnail

    Vercel Edge Middleware Rate Limit

    Add rate limiting to your application with any frontend framework.

  • Bot Detection with Botd thumbnail

    Bot Detection with Botd

    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.