Files
accounted/middleware.ts
T
Jakob Wennberg afc9f69def Minor < fix
2026-02-18 11:27:41 +01:00

21 lines
722 B
TypeScript

import { type NextRequest } from 'next/server'
import { updateSession } from '@/lib/supabase/middleware'
export async function middleware(request: NextRequest) {
return await updateSession(request)
}
export const config = {
matcher: [
/*
* Match all request paths except for the ones starting with:
* - _next/static (static files)
* - _next/image (image optimization files)
* - favicon.ico (favicon file)
* - api (API routes - they handle their own auth)
* - Static assets (images, scripts, manifest, icons, etc.)
*/
'/((?!_next/static|_next/image|favicon.ico|api|sw\\.js|sw-register\\.js|manifest\\.json|icons/|.*\\.(?:svg|png|jpg|jpeg|gif|webp|ico|js|json)$).*)',
],
}