Right now the middleware.ts will be called for every request. I believe it's setup as an example for supabase, but I'm unsure if it's either incomplete or just unused.
I think it should at least include the recommended matcher from the nextjs docs:
export const config = {
matcher: [
/*
* Match all request paths except for the ones starting with:
* - api (API routes)
* - _next/static (static files)
* - _next/image (image optimization files)
* - favicon.ico (favicon file)
*/
'/((?!api|_next/static|_next/image|favicon.ico).*)',
],
}
Right now the
middleware.ts
will be called for every request. I believe it's setup as an example for supabase, but I'm unsure if it's either incomplete or just unused.I think it should at least include the recommended matcher from the nextjs docs: