Closed pasovsky closed 5 years ago
Yes. Enabled is only available on route level if you want to disable or enable a route that is either included or excluded with the global include or exclude option. If you want to disable globally, an empty array for include should do.
I will fix the doc later today. Thanks for the report.
I'm using Glue and in the manifest I've added the options that are mentioned in the documentation.
{ plugin: 'hapi-pagination', options: { enabled: false, routes: { include: [] // Emptying include list will disable pagination } } },
This results in a joi validation error for "enabled" Looking atgetConfig
in config.js, the main config is validated againstinternals.schemas.options
which doesn't have that field. The enabled field is in theinternals.schemas.routeOptions
schema, but if I understand correctly, this is checked for each individual route, but not globally.