diff --git a/frontend/src/app/dashboard/(personalAccount)/page.tsx b/frontend/src/app/dashboard/(personalAccount)/page.tsx index d43f8f68..6e07b7d0 100644 --- a/frontend/src/app/dashboard/(personalAccount)/page.tsx +++ b/frontend/src/app/dashboard/(personalAccount)/page.tsx @@ -15,7 +15,7 @@ export default function PersonalAccountPage() { // Use client-side navigation instead of server redirect useEffect(() => { - router.replace('/dashboard'); + router.replace('/dashboard/agents'); }, [router]); // Return a minimal loading state until redirect happens diff --git a/frontend/src/middleware.ts b/frontend/src/middleware.ts new file mode 100644 index 00000000..98253d22 --- /dev/null +++ b/frontend/src/middleware.ts @@ -0,0 +1,11 @@ +import { NextRequest, NextResponse } from 'next/server'; +import { validateSession } from './lib/supabase/middleware'; + +export const middleware = (request: NextRequest) => { + return validateSession(request); +}; + +// Apply middleware to all routes +export const config = { + matcher: ['/((?!_next/static|_next/image|favicon.ico|api/webhooks).*)'], +}; \ No newline at end of file