mirror of
https://github.com/jimeh/heartb.it.git
synced 2026-02-19 12:56:47 +00:00
restructed things a bit more
This commit is contained in:
7
lib/middleware/host_redirect.coffee
Normal file
7
lib/middleware/host_redirect.coffee
Normal 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()
|
||||
Reference in New Issue
Block a user