Question about middleware.ts
Answered
Pink salmon posted this in #help-forum
Pink salmonOP
I'm following the nextjs tutorial and I've come across this
Does this mean I have to be good at regex? Or can I use this matcher everytime I build a nextjs app?
You're also using the matcher option from Middleware to specify that it should run on specific paths.https://nextjs.org/learn/dashboard-app/adding-authentication#:~:text=You%27re%20also%20using%20the%20matcher%20option%20from%20Middleware%20to%20specify%20that%20it%20should%20run%20on%20specific%20paths.
Does this mean I have to be good at regex? Or can I use this matcher everytime I build a nextjs app?
Answered by Toyger
not necessary, you should read this section https://nextjs.org/docs/app/building-your-application/routing/middleware#matcher
1 Reply
Toyger
not necessary, you should read this section https://nextjs.org/docs/app/building-your-application/routing/middleware#matcher
Answer