mirror of
https://github.com/simstudioai/sim.git
synced 2026-04-06 03:00:16 -04:00
fix(chat-deploy): fixed chat-deploy (#981)
This commit is contained in:
@@ -73,7 +73,8 @@ export async function middleware(request: NextRequest) {
|
||||
}
|
||||
|
||||
// For self-hosted deployments, redirect root path based on session status
|
||||
if (!isHosted && url.pathname === '/') {
|
||||
// Only apply redirects to the main domain, not subdomains
|
||||
if (!isHosted && !isCustomDomain && url.pathname === '/') {
|
||||
if (hasActiveSession) {
|
||||
// User has active session, redirect to workspace
|
||||
return NextResponse.redirect(new URL('/workspace', request.url))
|
||||
|
||||
Reference in New Issue
Block a user