Fix handling of ports in setup tool redirect

Fixes #1581
This commit is contained in:
Joseph Schorr 2016-06-27 13:37:52 -04:00
parent 529002d050
commit 0b389ec4ff

View file

@ -141,7 +141,14 @@
$scope.showSuperuserPanel = function() {
$('#setupModal').modal('hide');
var prefix = $scope.hasSSL ? 'https' : 'http';
var hostname = $scope.hostname || document.location.hostname;
var hostname = $scope.hostname;
if (!hostname) {
hostname = document.location.hostname;
if (document.location.port) {
hostname = hostname + ':' + document.location.port;
}
}
window.location = prefix + '://' + hostname + '/superuser';
};