middleware does not run on index page

Here's the middleware config
export const config = {
matcher: [
/*
* Match all request paths except for the ones starting with:
* - _next
* - static (static files)
* - favicon.ico (favicon file)
*/
"/(.*?trpc.*?|(?!static|.*\\..*|_next|favicon.ico).*)",
],
};
export const config = {
matcher: [
/*
* Match all request paths except for the ones starting with:
* - _next
* - static (static files)
* - favicon.ico (favicon file)
*/
"/(.*?trpc.*?|(?!static|.*\\..*|_next|favicon.ico).*)",
],
};
The middleware does not seem to run when I visit the main index page / The matcher seems to not be a regular expression, I can't seem to debug the matcher like any other regex
1 Reply
devagr
devagrOP2y ago
also ct3a does not come with middleware? nvm... added another matcher "/" in the array and it works
Want results from more Discord servers?
Add your server