System Information
- Strapi Version: 4.3.6
- Operating System: Linux
- Database: Postgres
- Node Version: 16.17
- NPM Version:
- Yarn Version: 1.22.19
Hey folks,
I do have my own global policy, which I wrote myself, which should apply to every default route, which are created by the createCoreRouter
. But I don’t want to write out every route manually, since I don’t want to configure anything else on the route.
Is this even possible? I didn’t found anything in the docs.
Otherwise I would need to configure any route like this:
module.exports = {
routes: [
{
method: 'GET',
path: '/restaurants',
handler: 'Restaurant.find',
config: {
// This should be configured globally for every route
policies: ['global::is-allowed-to-view']
}
}
]
}
Regards