Files
webshop/shop/middleware.ts
DanielS f914e9cdf1
All checks were successful
Staging Build / build (push) Successful in 3m27s
fix(auth): restore middleware, fix setup redirect loop, and add next.config rewrites proxying Supabase requests
2026-07-03 10:57:22 +02:00

21 lines
629 B
TypeScript

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)$).*)",
],
};