fix(redirects): update middleware to allow access to /chat regardless of auth status (#1516)

This commit is contained in:
Waleed
2025-10-01 10:46:18 -07:00
committed by GitHub
parent 1a2c4040aa
commit 97f69a24e1

View File

@@ -147,6 +147,10 @@ export async function middleware(request: NextRequest) {
return NextResponse.next()
}
if (url.pathname.startsWith('/chat/')) {
return NextResponse.next()
}
if (url.pathname.startsWith('/workspace')) {
if (!hasActiveSession) {
return NextResponse.redirect(new URL('/login', request.url))