Replies: 1 comment
-
Do I understand it correctly, that you're trying to find a solution to reduce the number of middleware invocations? In the RSC beta, you currently have to call the middleware on all content routes. Therefore it's unfortunately not possible to restrict the However, if you use Client Components (stable), you can theoretically limit the middleware to I think the RSC integration will have the same option in the future, but I'm waiting for So I guess in your current situation, you have to pick a tradeoff that works for you and the project. Hope this helps! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I started to work on a website (App Router), and I have multiple domains, like domain.fr and domain.es and domain.org.uk etc.
The domains have different page structures, so it's not a mirror website.
I have a middleware with the following code:
I'm using [lang] inside the app folder, and everything is working well, but I would like to know if it's possible to handle this simple thing some other ways, like vercel.json or next.config.js. The reason: I have 12 domain names with hundreds of pages/domain, around 10,000 users per month/domain, so using middleware, I would reach the 1M limit quickly.
I asked on Next.js discussion page as well, but maybe someone can help me here too.
Code examples would be welcome.
Beta Was this translation helpful? Give feedback.
All reactions