diff --git a/next.config.js b/next.config.js index bcfc4c1..882a7bc 100644 --- a/next.config.js +++ b/next.config.js @@ -22,6 +22,20 @@ const nextConfig = { }, reactStrictMode: true, redirects, + async rewrites() { + return [ + { + source: '/((?!admin|api)):path*', + destination: '/:tenantDomain/:path*', + has: [ + { + type: 'host', + value: '(?.*)', + }, + ], + }, + ] + }, } export default withPayload(nextConfig, { devBundleServerPackages: false })