How to define route filters

If you have a lot of routes, it might make sense to use your own router instance. You can then use filters with it. There is an example in this topic: