Proxy
Also known as: proxy.ts / Next.js Proxy / リバースプロキシ
In Next.js v16+, the successor filename to middleware.ts. More broadly, a component that relays requests between client and server, handling auth, caching, and load balancing.
Overview
In Next.js v16, Vercel deprecated middleware.ts in favor of proxy.ts. The functionality is equivalent to the old Middleware, but the rename clarifies the separation of concerns with the router. While conceptually distinct from reverse proxies like Nginx or Caddy, the role of relaying and rewriting requests is shared.
Migration Steps
The core migration is renaming middleware.ts to proxy.ts and updating the matcher to the recommended pattern. Note that the old filename stops working in Vercel deployments, so the rename is mandatory.
Related Columns
Related Terms
Feel free to contact us
Contact Us