-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Is there a way to get the matched route pattern as opposed to the actual url (ctx.request.url)?
Also this middleware appears near the end of all my middleware (after the ones that need to go before it like logging and permissions). But I'd like to be able to log the matched route pattern in the earlier middleware. Something like a router.getMatchedPattern function we could call at the beginning of our middleware to resolve the matched pattern which we can use throughout the other middleware. What do you think of such feature?
app.use(addToLogger(router.getMatchedPattern())
// lots of other middleware go here
app.use(othermiddleware)
app.use(router.routes())Metadata
Metadata
Assignees
Labels
No labels