Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lacking route-specific middleware chain #591

Open
hjb1694 opened this issue Apr 4, 2024 · 1 comment
Open

Lacking route-specific middleware chain #591

hjb1694 opened this issue Apr 4, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@hjb1694
Copy link

hjb1694 commented Apr 4, 2024

What is the problem this feature would solve?

I would like to see a solution where I can pass multiple handlers or middlewares to a specific route, being able to funnel the request through and prevent passage to subsequent handlers.

What is the feature you are proposing to solve the problem?

I would like to be able to pass multiple handlers in an array, similar to Express. Maybe produce a function to create a new middleware chain, where the argument passed is an array of handlers, or provide the option to pass an array of handlers/middleware where a single handler is the only option at this time.

What alternatives have you considered?

I have seen examples of custom middleware implementations that are framework agnostic, but I do question their robustness.

@hjb1694 hjb1694 added the enhancement New feature or request label Apr 4, 2024
@phrynus
Copy link

phrynus commented Apr 15, 2024

Yes, manual middleware can make code inefficient and difficult to understand

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants