feat: added Nextjs multi-tenant routing rewrites for path slugs and subdomain slugs

This commit is contained in:
Yehoshua Sandler 2025-05-18 11:39:14 -05:00
parent d0b5cf95ae
commit 6f7c97ac84

View File

@ -22,6 +22,20 @@ const nextConfig = {
},
reactStrictMode: true,
redirects,
async rewrites() {
return [
{
source: '/((?!admin|api)):path*',
destination: '/:tenantDomain/:path*',
has: [
{
type: 'host',
value: '(?<tenantDomain>.*)',
},
],
},
]
},
}
export default withPayload(nextConfig, { devBundleServerPackages: false })