Skip to content

Instantly share code, notes, and snippets.

@AndersDJohnson
Last active June 5, 2019 13:34
Show Gist options
  • Select an option

  • Save AndersDJohnson/4395185 to your computer and use it in GitHub Desktop.

Select an option

Save AndersDJohnson/4395185 to your computer and use it in GitHub Desktop.
express rewrite URLs
app.use (req, res, next) ->
if req.url.indexOf('/fake') isnt -1
req.url = req.url.replace('/fake', '/ghost')
next()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment