You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We recommend users avoid relying on Middleware unless no other options
exist. Our goal is to give them APIs with better ergonomics so they can
achieve their goals without Middleware.
The term “middleware” often confuses users with Express.js middleware,
which can encourage misuse. To clarify our direction, we are renaming
the file convention to “proxy.” This highlights that we are moving away
from Middleware, breaking down its overloaded features, and making the
Proxy clear in its purpose.
`proxy.js` should be a drop-in replacement for `middleware.js` for its
features, but ONE thing:
```diff
- export function middleware
+ export function proxy
```
Codemod: #84127
---------
Co-authored-by: Benjamin Woodruff <[email protected]>
Copy file name to clipboardExpand all lines: packages/next/errors.json
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -863,5 +863,7 @@
863
863
"862": "Request body exceeded %s",
864
864
"863": "\\`<Link legacyBehavior>\\` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's \\`<a>\\` tag.",
865
865
"864": "Missing value for segment key: \"%s\" with dynamic param type: %s",
866
-
"865": "`experimental.rdcForNavigations` is enabled, but `experimental.cacheComponents` is not."
866
+
"865": "`experimental.rdcForNavigations` is enabled, but `experimental.cacheComponents` is not.",
867
+
"866": "Both \"%s\" and \"%s\" files are detected. Please use \"%s\" instead.",
868
+
"867": "The %s \"%s\" must export a %s or a \\`default\\` function"
0 commit comments