restructed things a bit more

This commit is contained in:
2012-03-15 09:19:19 +00:00
parent 8c1ebf8b91
commit 431b40f506
6 changed files with 46 additions and 44 deletions

View File

@@ -0,0 +1,7 @@
module.exports = (redirect_map = {}) ->
(req, res, next) ->
host = req.header('Host')
if redirect_map[host]
res.redirect(redirect_map[host])
else
next()