mirror of https://github.com/kortix-ai/suna.git
fucking revert
This commit is contained in:
parent
37d253d13e
commit
963d930125
|
@ -15,7 +15,7 @@ export default function PersonalAccountPage() {
|
|||
|
||||
// Use client-side navigation instead of server redirect
|
||||
useEffect(() => {
|
||||
router.replace('/dashboard/agents');
|
||||
router.replace('/dashboard');
|
||||
}, [router]);
|
||||
|
||||
// Return a minimal loading state until redirect happens
|
||||
|
|
|
@ -71,7 +71,7 @@ export const validateSession = async (request: NextRequest) => {
|
|||
// https://supabase.com/docs/guides/auth/server-side/nextjs
|
||||
const { data: { user } } = await supabase.auth.getUser();
|
||||
|
||||
const protectedRoutes = ['/invitation'];
|
||||
const protectedRoutes = ['/dashboard', '/invitation'];
|
||||
|
||||
if (!user && protectedRoutes.some(path => request.nextUrl.pathname.startsWith(path))) {
|
||||
// redirect to /auth
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
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).*)'],
|
||||
};
|
Loading…
Reference in New Issue