mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
2b4b1ec111
Backports #97327 ("Revert i18n localization change for dynamic Pages API routes (#94905)") to `next-16-3`. Clean cherry-pick of `2f84a1f` — `next-16-3` carries the exact code being reverted, so it applies as-is. Restores i18n locale prefixing for dynamic Pages API routes, so the emitted matcher and the adapter's i18n rules agree again on whether `/api/...` carries a locale prefix. When they disagree the matcher is unreachable and requests fall through to `/{locale}/404`. Pairs with the adapter revert (nextjs/adapter-vercel#101, published as `adapter-vercel@0.0.1-beta.26`). Full rationale and reproduction in #97327.