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

More than one middleware for one path? #342

Open
JesusBarreda opened this issue May 31, 2016 · 1 comment
Open

More than one middleware for one path? #342

JesusBarreda opened this issue May 31, 2016 · 1 comment

Comments

@JesusBarreda
Copy link

Hi,

I would like to know if there is a way to apply more than one middleware to a resource. Maybe something similar to your "logger_middleware.rs" example but applying only for one resource because I suppose the sentence server.utilize(mw) applies "mw" to all server's resources.

It would be the expressjs pattern:

app.get('/path/to/something', mw1, mw2, ..., mwN, function(req, res) {
...
});

Thank you very much in advance.

@Ryman
Copy link
Member

Ryman commented Jun 7, 2016

I don't think we have a good story for this currently other than adding a bunch of things mounted under the same path which may be somewhat inefficient.

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

No branches or pull requests

2 participants