NNext.jsSource ↗
The middleware.js file convention has been deprecated in Next.js 16 and renamed to proxy.js .

The middleware.js file convention has been deprecated in Next.js 16 and renamed to proxy.js.

All functionality remains the same — only the file and export names have changed. See the Migration to Proxy section for details on how to migrate.

You can automatically migrate by running:

npx @next/codemod@canary middleware-to-proxy .

For full documentation, see the proxy.js API reference.


Source: docs/01-app/03-api-reference/03-file-conventions/middleware.mdx

Generated by smolify with deterministic-repository-import-v1 · 1 source file
middleware.js — Next.js · Smolify