Skip to content
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

fix absent of req.originalUrl #45

Closed
juliovedovatto opened this issue Jun 20, 2019 · 1 comment · Fixed by #46
Closed

fix absent of req.originalUrl #45

juliovedovatto opened this issue Jun 20, 2019 · 1 comment · Fixed by #46

Comments

@juliovedovatto
Copy link

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?

@jkyberneees
Copy link
Collaborator

jkyberneees commented Jun 20, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants