auth for specific routes
I have pages like /account/ and /admin/ i want to protect so i made a middleware I put this into my nuxt config routerules is this the right way to go about it compared to specifying the middleware per layout or per page?
'/account/**': {
meta: { requiredRole: 'user', middleware: ['auth'] },
},
'/admin/**': {
meta: { requiredRole: 'admin', middleware: ['auth'] },
},