mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2026-10-25 17:42:27 +08:00
Co-authored-by: nilbuild <4921183+nilbuild@users.noreply.github.com>
1.0 KiB
1.0 KiB
Proxy
Proxy is a function that runs before a request completes, letting you inspect and modify the request or response. It replaces Middleware, which served the same purpose in earlier versions of Next.js. It runs on Vercel's Edge Runtime, so you can rewrite URLs, redirect requests, set headers, or check authentication before a page or API route renders. Common uses include protecting routes based on login state, A/B testing, and localization based on request headers.
Visit the following resources to learn more: