Updated some routing

This commit is contained in:
Kasper Rynning-Tønnesen
2017-05-02 18:05:51 +02:00
parent 1d97e9b37e
commit f8e5d63fba

View File

@@ -10,7 +10,7 @@ router.use(function(req, res, next) {
router.route('/:channel_name').get(function(req, res, next){
var subdomain = req.headers['x-forwarded-host'].split(".");
if((subdomain[0] != 'localhost' && !(subdomain.length >= 2 && subdomain[1] == 'localhost'))) {
if((subdomain[0] != 'localhost' && !(subdomain.length >= 2 && (subdomain[1] == 'localhost' || subdomain[1] == 'remote')))) {
res.redirect("https://zoff.me");
return;
}