Static GitHub Issues

[2453] nuxt custom router middleware /dir/

prev: Store middleware throwing an Vuex error
next: Components in layout are not rendered

Hi, I know how to create a middleware for each route, and in my case auth guards, but is there any other way just to add the middleware in nuxt.confif.js to guard all /users/ directory for example or /business/

I can't figure that out if that can be done, and until now I'm doing it manually by adding the middleware to to every page.

Cheers :+1:

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2128">#c2128</a>)</em></sub></div>