refactor: rename proxy.ts to middleware.ts and update function name to middleware

This commit is contained in:
DanielS
2026-06-24 13:02:28 +02:00
parent f2db40fa36
commit 6e5cee0180

20
shop/middleware.ts Normal file
View File

@@ -0,0 +1,20 @@
import { updateSession } from "@/lib/supabase/proxy";
import { type NextRequest } from "next/server";
export async function middleware(request: NextRequest) {
return await updateSession(request);
}
export const config = {
matcher: [
/*
* Match all request paths except:
* - _next/static (static files)
* - _next/image (image optimization files)
* - favicon.ico (favicon file)
* - images - .svg, .png, .jpg, .jpeg, .gif, .webp
* Feel free to modify this pattern to include more paths.
*/
"/((?!_next/static|_next/image|favicon.ico|.*\\.(?:svg|png|jpg|jpeg|gif|webp)$).*)",
],
};