Next.js · Junior · Question 32 of 75

In Next.js 16, what is the file formerly called middleware.ts named?

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.

Further reading

Problem with a question

Next.js · Junior · question 32

Test yourself

Take the Next.js · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz