Question · Next.js course · Module 2: Routing and Layouts

File That Runs Before a Request Is Handled

In Next.js 16, what must the file in the project root that replaced middleware.ts and runs before a request is handled be called?

Answer options

  • server.js
  • proxy.js
  • handler.js
  • interceptor.js
Show the answer

Correct answer:

  • proxy.js