Made change to both functions

This commit is contained in:
Kasper Rynning-Tønnesen
2017-05-02 18:06:31 +02:00
parent f8e5d63fba
commit f366b9a0dc

View File

@@ -109,7 +109,7 @@ router.route('/api/mail').post(function(req, res) {
router.route('/').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;
}