Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixing PR
  • Loading branch information
serby committed Feb 14, 2014
1 parent 38e65f7 commit bc4dafd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/middleware/mapped.js
Expand Up @@ -48,9 +48,11 @@ module.exports = function(mappedPaths) {
}

var parsedUrl = url.parse(req.url)
, origPath = reverseMap[parsedUrl.pathname]
, mappedUrl = reverseMap[parsedUrl.pathname]
if (mappedUrl) {
req.url = mappedUrl + (parsedUrl.search || '')
}

if (origPath) req.url = origPath + parsedUrl.search
next()
}
}
Expand Down

0 comments on commit bc4dafd

Please sign in to comment.