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

[Router] Support .use() middleware mounting #11

Open
danneu opened this issue Feb 4, 2017 · 0 comments
Open

[Router] Support .use() middleware mounting #11

danneu opened this issue Feb 4, 2017 · 0 comments

Comments

@danneu
Copy link
Owner

danneu commented Feb 4, 2017

val router = Router {
    use(middleware1())
    // ... A routes ...
    use(middleware2())
    // ... B routes ...
    use(middleware3())
}
  • middleware1 touches every request.
  • middleware2 touches requests that were not handled by any A routes.
  • middleware3 touches requests that would otherwise 404 since no routes matched/responded.
@danneu danneu changed the title [SafeRouter] Support .use() middleware mounting [Router] Support .use() middleware mounting Feb 4, 2017
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

1 participant