Pular para o conteúdo
Documentação do Next.js PT-BR
Esta página ainda está em inglês. A tradução ainda não foi feita; o conteúdo abaixo é o original de nextjs.org.

middleware.jsRascunho

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.

Learn more about Proxy