You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
michael-ts
changed the title
routers not handled properly`
routers not handled properly
Mar 28, 2017
The documentation says:
However, this does not seem to be true on either count if a router is used, e.g. if I set up the following:
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.
The text was updated successfully, but these errors were encountered: