diff --git a/static/js/pages/setup.js b/static/js/pages/setup.js index 036adbe31..cbd539c16 100644 --- a/static/js/pages/setup.js +++ b/static/js/pages/setup.js @@ -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'; };