Initial working state: CL3.5 complete (Plesk sync + suspend/unsuspend)
This commit is contained in:
15
middleware.ts
Normal file
15
middleware.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { createMiddlewareClient } from "@supabase/auth-helpers-nextjs";
|
||||
import { NextResponse, type NextRequest } from "next/server";
|
||||
|
||||
export async function middleware(req: NextRequest) {
|
||||
const res = NextResponse.next();
|
||||
const supabase = createMiddlewareClient({ req, res });
|
||||
|
||||
await supabase.auth.getSession();
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
export const config = {
|
||||
matcher: ["/dashboard/:path*", "/auth/callback", "/api/((?!stripe/webhook).*)"],
|
||||
};
|
||||
Reference in New Issue
Block a user