-
Notifications
You must be signed in to change notification settings - Fork 45
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
How can I find the original route? #29
Comments
I don't think we "stick" this anywhere, sorry |
I'm open for someone to add it in though, it could be useful |
Hmm... can't be done with route as is, but this is an interesting problem.
@parris: I'm also open to PRs adding this but curious. What's your use case? "additional checks"? Sounds like you should pass in a compose'd route as the handler. For example,
|
I would also be interested by this because it's needed by opbeat in order to track performance per request. Here is the documentation: https://opbeat.com/docs/articles/get-started-with-a-custom-nodejs-stack/#route-naming |
I believe this was addressed in #49, right? |
Let's say a request matched to
/user/:id
. Is there an easy way from some middleware's context to get the original route string instead of the current path.this.url
might produce/user/1234
, but I'm looking for/user/:id
so I can do some additional checks before some other middleware.Thanks!
The text was updated successfully, but these errors were encountered: