framework
framework copied to clipboard
Ability to explicitly control which routes server middleware run on
Describe the feature
A common use case for middleware is authentication. But equaly as common is the case that a side has both public and private pages and api routes.
It is possible to do this within the middleware its self but it makes sense to allow a user to control which routes a middle runs on. Pottebtially using pattern matching to include or excluded.
Additionally it would be nice to differentiate api routes and page routes.
Additional information
- [X] Would you be willing to help implement this feature?
- [ ] Could this feature be implemented as a module?
Final checks
- [X] Read the contribution guide.
- [X] Check existing discussions and issues.