-
Notifications
You must be signed in to change notification settings - Fork 86
feat: middleware warning #1425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: middleware warning #1425
Conversation
✅ Deploy Preview for netlify-plugin-nextjs-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for netlify-plugin-nextjs-export-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for netlify-plugin-nextjs-nx-monorepo-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for netlify-plugin-nextjs-static-root-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for next-plugin-rsc-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for netlify-plugin-nextjs-next-auth-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for next-plugin-edge-middleware ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for next-i18next-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for next-plugin-canary ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sarahetter, thanks for tagging me for review! I have some thoughts about breaking the middleware content into its own section. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a few notes about wording. I think we should remove reference to running middleware at the origin, because I don't think most people will understand what that means. I wonder if we should move the bit about enabling edge functions right up to the top of the middleware section and emphasise the fact that they really, really should enable it!
README.md
Outdated
### No nested middleware in Next 12.2.0 | ||
|
||
In Next 12.2.0, nested middleware [has been deprecated](https://nextjs.org/docs/messages/middleware-upgrade-guide) in | ||
favour of root level middleware. If you are not using edge functions then this means that you won't get the benefits of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
favour of root level middleware. If you are not using edge functions then this means that you won't get the benefits of | |
favor of root level middleware. If you are not using edge functions then this means that you won't get the benefits of |
oops
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cries in british/canadian
Summary
With Next 12.2.0's release, nested middleware no longer exists. Root level middleware run on origin will cause all of the pages to run as SSR (no static pages). If a user chooses Netlify Edge Functions, the middleware will run on edge, and the CDN static pages are served as normal.
This adds a warning to users who are using middleware but aren't using Netlify Edge Functions
Test plan
Relevant links (GitHub issues, Notion docs, etc.) or a picture of cute animal
Closes #1379
Standard checks:
🧪 Once merged, make sure to update the version if needed and that it was published correctly.