build ok,

This commit is contained in:
louiscklaw
2025-04-14 09:26:24 +08:00
commit 6c931c1fe8
770 changed files with 63959 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
import { NextResponse } from 'next/server';
import type { NextRequest } from 'next/server';
import { config as appConfig } from '@/config';
import { AuthStrategy } from '@/lib/auth/strategy';
import { supabaseMiddleware } from '@/lib/auth/supabase/middleware';
export async function middleware(req: NextRequest): Promise<NextResponse> {
let res: NextResponse;
if (appConfig.auth.strategy === AuthStrategy.SUPABASE) {
res = await supabaseMiddleware(req);
} else {
res = NextResponse.next({ headers: req.headers });
}
return res;
}
export const config = { matcher: ['/auth/:path*', '/dashboard/:path*'] };