Redirect to naked domain if we are not on a webadmin origin

This commit is contained in:
Johannes Zellner
2017-01-10 21:23:16 +01:00
parent 349c261238
commit 06338e0a1f

View File

@@ -147,6 +147,12 @@ angular.module('Application').controller('MainController', ['$scope', '$route',
return;
}
// support local development with localhost check
if (window.location.hostname !== status.adminFqdn && window.location.hostname !== 'localhost') {
window.location.href = status.adminFqdn + '/nakeddomain.html';
return;
}
Client.refreshConfig(function (error) {
if (error) return $scope.error(error);