Skip to content

Commit 03bb437

Browse files
authored
fix(chat-deploy): fixed chat-deploy (#981)
1 parent 9f02f88 commit 03bb437

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/sim/middleware.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ export async function middleware(request: NextRequest) {
7373
}
7474

7575
// For self-hosted deployments, redirect root path based on session status
76-
if (!isHosted && url.pathname === '/') {
76+
// Only apply redirects to the main domain, not subdomains
77+
if (!isHosted && !isCustomDomain && url.pathname === '/') {
7778
if (hasActiveSession) {
7879
// User has active session, redirect to workspace
7980
return NextResponse.redirect(new URL('/workspace', request.url))

0 commit comments

Comments
 (0)