Skip to content

fix absent of req.originalUrl #45

@juliovedovatto

Description

@juliovedovatto

I faced an issue while working with this awesome micro framework.

Some third-party middlewares relies on req.originalUrl to work. Example: https://www.npmjs.com/package/session-middleware

I had to add an extra middlware to solve this problem.

service.use((req,res, next) => {
  if (!req.originalUrl)
    req.originalUrl = req.url

  next()
})

It worked for my case, but it would be good to have this property in the req object as well.

I checked express and sails and both have this property in req object.

Do you think it is possible to have it available?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions