Skip to content

Support get real route path in middleware #4196

@seepine

Description

@seepine

What is the feature you are proposing?

Now

app.use(async (c, next) => {
    console.log(c.req.method, c.req.routePath, c.req.path, c.req.url)
    //             GET           /*            /user/1      http://127.0.0.1:3000/user/1

}

app.get("/user/:id", ...)

// and curl
// curl http://127.0.0.1:3000/user/1

Want to

    console.log(c.req.routePath)
    //          /user/:id

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions