protect dynamic routes in the middleware
Hello!
I want to protect routes such as /users/[id] in one middleware file, can I do it in a simple way?
What I am doing is
But I don't really like this idea and I can't use
I'm looking for suggestions and ideas.
Thanks!
I want to protect routes such as /users/[id] in one middleware file, can I do it in a simple way?
What I am doing is
But I don't really like this idea and I can't use
getRouterParam(event, 'id') in the middleware.I'm looking for suggestions and ideas.
Thanks!
