Fix UI — CSS variables, sidebar toggle with chevron, settings panel pushes content
This commit is contained in:
@@ -4,8 +4,9 @@ import type { NextRequest } from 'next/server';
|
||||
export function proxy(request: NextRequest) {
|
||||
const { pathname } = request.nextUrl;
|
||||
|
||||
// Allow login page and public assets
|
||||
// Always allow these through
|
||||
if (
|
||||
pathname.startsWith('/api/') ||
|
||||
pathname.startsWith('/login') ||
|
||||
pathname.startsWith('/_next') ||
|
||||
pathname.startsWith('/manifest.json') ||
|
||||
@@ -15,7 +16,7 @@ export function proxy(request: NextRequest) {
|
||||
return NextResponse.next();
|
||||
}
|
||||
|
||||
// Check for session cookie
|
||||
// Check for session cookie on all other routes
|
||||
const session = request.cookies.get('aaronai_session');
|
||||
if (!session?.value) {
|
||||
return NextResponse.redirect(new URL('/login', request.url));
|
||||
|
||||
Reference in New Issue
Block a user