]> arthur.barton.de Git - netdata.git/blobdiff - web/index.html
properly handle redirections from https netdata to http netdata
[netdata.git] / web / index.html
index df54b3e043c84cc7d29e1da0c30fa163511595b1..8f31ae54279875dbb9c7d0623ee14e47125f8470 100644 (file)
@@ -1263,11 +1263,16 @@ var gotoServerMiddleClick = false;
 var gotoServerStop = false;
 function gotoServerValidateUrl(id, guid, url) {
     var penaldy = 0;
+    var error = 'failed';
+
     if(document.location.toString().startsWith('http://') && url.toString().startsWith('https://'))
             // we penalize https only if the current url is http
             // to allow the user walk through all its servers.
             penaldy = 500;
 
+    else if(document.location.toString().startsWith('https://') && url.toString().startsWith('http://'))
+        error = 'can\'t check';
+    
     var finalURL = netdataURL(url);
 
     setTimeout(function() {