h3
h3 copied to clipboard
add `getMatchedRoute(event)`
Describe the feature
This feature works similar to getRequestPath(event)
but for the defined route path
Example
When the route /api/route/:id
is requested, the getRequestPath
returns it requested path, like: '/api/route/123'. The getRoutePath
will return the route path to it self /api/route/:id
.
Why this feature?
Middleware's that verifies the requested route can't access the defined route, just the requested path
Additional information
- [ ] Would you be willing to help implement this feature?