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
As in the example repo, it has middleware implemented to rewrite all requests with the [tenant] param prefixed in the route.
So for example, a user visiting foobar.acme.org/bizbat is routed to /foobar/bizbat
My root layout requires some conditional logic based on the tenant param. I was pleasantly surprised that it seems like the app functions without a /app/layout.js perfectly fine, with an /app/[tenant]/layout.js in its place.
Are there any reasons this wouldn't be a great idea?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Summary
I am implementing a multi-tenant application a la https://github.com/vercel/platforms
As in the example repo, it has middleware implemented to rewrite all requests with the
[tenant]
param prefixed in the route.So for example, a user visiting
foobar.acme.org/bizbat
is routed to/foobar/bizbat
My root layout requires some conditional logic based on the tenant param. I was pleasantly surprised that it seems like the app functions without a
/app/layout.js
perfectly fine, with an/app/[tenant]/layout.js
in its place.Are there any reasons this wouldn't be a great idea?
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions