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

routers not handled properly #29

Open
michael-ts opened this issue Mar 28, 2017 · 0 comments
Open

routers not handled properly #29

michael-ts opened this issue Mar 28, 2017 · 0 comments

Comments

@michael-ts
Copy link

The documentation says:

By default, Streamlined middleware handlers will continue to the next middleware, while Streamlined route and error handlers won't. This is generally what you want, but you can specify whether next is called by explicitly returning true or false.

However, this does not seem to be true on either count if a router is used, e.g. if I set up the following:

    var router = express.Router()
    router.use(cookieParser())
    router.get(endpoint,ServiceEndpoint)
    app.use(router)

What if find is happening is that even if ServiceEndpoint returns false, it is still falling through to my next (default route) handler, which is messing things up and preventing a proper response from being sent.

@michael-ts michael-ts changed the title routers not handled properly` routers not handled properly Mar 28, 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