feat: added Nextjs multi-tenant routing rewrites for path slugs and subdomain slugs
This commit is contained in:
parent
d0b5cf95ae
commit
6f7c97ac84
@ -22,6 +22,20 @@ const nextConfig = {
|
|||||||
},
|
},
|
||||||
reactStrictMode: true,
|
reactStrictMode: true,
|
||||||
redirects,
|
redirects,
|
||||||
|
async rewrites() {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
source: '/((?!admin|api)):path*',
|
||||||
|
destination: '/:tenantDomain/:path*',
|
||||||
|
has: [
|
||||||
|
{
|
||||||
|
type: 'host',
|
||||||
|
value: '(?<tenantDomain>.*)',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export default withPayload(nextConfig, { devBundleServerPackages: false })
|
export default withPayload(nextConfig, { devBundleServerPackages: false })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user