Skip to content

How to blacklist all routes to use a plugin config? #2264

@toymachiner62

Description

@toymachiner62

I'm curious what the best approach is to blacklist all routes by default to use a plugin config. I'm working on my hapi-authorization plugin which works great for routes you add the plugin config to, but this could easily be missed by a developer.

I'm wondering if there is an option or something so that I can have all my routes automatically use this in their config plugins: {'hapiAuthorization': {roles: ['AUTHORIZED']}}, without having to specify it on every route, but then I would be able to override or disable this on each route individually if required.

Metadata

Metadata

Assignees

Labels

featureNew functionality or improvement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions