Skip to content

Commit

Permalink
Merge pull request #1 from paulogr/originalUrl
Browse files Browse the repository at this point in the history
Rewrite originalUrl on request object.
  • Loading branch information
kapouer authored May 31, 2017
2 parents 6720397 + d2b37a8 commit e772892
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function rewrite(src, dst) {
return next();
}
}
req.url = (dst || src).replace(/\$(\d+)|(?::(\w+))/g, function(_, n, name) {
req.url = req.originalUrl = (dst || src).replace(/\$(\d+)|(?::(\w+))/g, function(_, n, name) {
if (name) {
if (m) return m[map[name].index + 1];
else return req.params[name];
Expand Down

0 comments on commit e772892

Please sign in to comment.