middleware supabse
Unanswered
Gazami crab posted this in #help-forum
Gazami crabOP
Hey everyone,
I implemented a middleware by following the subapase tutorial
So this is my middleware. I adjusted briefly to exclude an api route I created(api/finished-route). But the middleware seems to still work on my api route. Caan someone guide me? Did I do something wrong?
Cheers
I implemented a middleware by following the subapase tutorial
So this is my middleware. I adjusted briefly to exclude an api route I created(api/finished-route). But the middleware seems to still work on my api route. Caan someone guide me? Did I do something wrong?
Cheers
import { updateSession } from '../lib/supabase/middleware'
export async function middleware(request) {
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)
* Feel free to modify this pattern to include more paths.
*/
'/((?!_next/static|_next/image|favicon.ico|api/finished-route|.*\\.(?:svg|png|jpg|jpeg|gif|webp)$).*)',
],
}