Commit 62fb290
committed
chore: migrate from middleware.ts to proxy.ts for Next.js 16 compatibility
Migrate from the deprecated middleware.ts file convention to the new
proxy.ts convention as required by Next.js 16.0.10.
The middleware file convention has been deprecated and renamed to 'proxy'
to better clarify its purpose as a network boundary in front of the app,
and to avoid confusion with Express.js middleware.
Changes:
- Rename apps/site/middleware.ts to apps/site/proxy.ts
- Add named export function 'proxy' instead of default export
- Add NextRequest type import for type safety
- Maintain full compatibility with next-intl internationalization
- Update comments to reflect proxy terminology
This resolves the deprecation warning:
'The middleware file convention is deprecated. Please use proxy instead.'
Refs: https://nextjs.org/docs/messages/middleware-to-proxy1 parent b5ccb5f commit 62fb290
1 file changed
+14
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
6 | 13 | | |
7 | 14 | | |
8 | 15 | | |
| |||
17 | 24 | | |
18 | 25 | | |
19 | 26 | | |
20 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
21 | 33 | | |
22 | 34 | | |
0 commit comments