mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2026-03-12 00:19:18 +00:00
main.js: Updated checkForWebConsoleRedirection() to add delay before redirection to new service URL to allow web server to restart.
This commit is contained in:
@@ -1849,7 +1849,10 @@ function checkForWebConsoleRedirection(responseJSON) {
|
||||
|
||||
if (location.protocol == "https:") {
|
||||
if (!responseJSON.response.webServiceEnableTls) {
|
||||
window.open("http://" + window.location.hostname + ":" + responseJSON.response.webServiceHttpPort, "_self");
|
||||
setTimeout(function () {
|
||||
window.open("http://" + window.location.hostname + ":" + responseJSON.response.webServiceHttpPort, "_self");
|
||||
}, 2500); //delay redirection to allow web server to restart
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1858,12 +1861,18 @@ function checkForWebConsoleRedirection(responseJSON) {
|
||||
if ((currentPort == 0) || (currentPort == ""))
|
||||
currentPort = 443;
|
||||
|
||||
if (currentPort != responseJSON.response.webServiceTlsPort)
|
||||
window.open("https://" + window.location.hostname + ":" + responseJSON.response.webServiceTlsPort, "_self");
|
||||
if (currentPort != responseJSON.response.webServiceTlsPort) {
|
||||
setTimeout(function () {
|
||||
window.open("https://" + window.location.hostname + ":" + responseJSON.response.webServiceTlsPort, "_self");
|
||||
}, 2500); //delay redirection to allow web server to restart
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (responseJSON.response.webServiceEnableTls && responseJSON.response.webServiceHttpToTlsRedirect) {
|
||||
window.open("https://" + window.location.hostname + ":" + responseJSON.response.webServiceTlsPort, "_self");
|
||||
setTimeout(function () {
|
||||
window.open("https://" + window.location.hostname + ":" + responseJSON.response.webServiceTlsPort, "_self");
|
||||
}, 2500); //delay redirection to allow web server to restart
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1872,8 +1881,11 @@ function checkForWebConsoleRedirection(responseJSON) {
|
||||
if ((currentPort == 0) || (currentPort == ""))
|
||||
currentPort = 80;
|
||||
|
||||
if (currentPort != responseJSON.response.webServiceHttpPort)
|
||||
window.open("http://" + window.location.hostname + ":" + responseJSON.response.webServiceHttpPort, "_self");
|
||||
if (currentPort != responseJSON.response.webServiceHttpPort) {
|
||||
setTimeout(function () {
|
||||
window.open("http://" + window.location.hostname + ":" + responseJSON.response.webServiceHttpPort, "_self");
|
||||
}, 2500); //delay redirection to allow web server to restart
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user