We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f02f88 commit 03bb437Copy full SHA for 03bb437
apps/sim/middleware.ts
@@ -73,7 +73,8 @@ export async function middleware(request: NextRequest) {
73
}
74
75
// For self-hosted deployments, redirect root path based on session status
76
- if (!isHosted && url.pathname === '/') {
+ // Only apply redirects to the main domain, not subdomains
77
+ if (!isHosted && !isCustomDomain && url.pathname === '/') {
78
if (hasActiveSession) {
79
// User has active session, redirect to workspace
80
return NextResponse.redirect(new URL('/workspace', request.url))
0 commit comments