Next.js · Junior · Question 32 of 75
In Next.js 16, what is the file formerly called middleware.ts named?
- ✓Correct answer:
proxy.ts - 2
interceptor.ts - 3
gateway.ts
Explanation
The middleware convention is deprecated and renamed to proxy to emphasize its role at the network boundary (redirects, rewrites, headers). The exported function is also called proxy. Proxy runs in the Node.js runtime; the edge runtime isn't supported there.