Private GIT

Skip to content
Snippets Groups Projects
Commit 9bb3c4d4 authored by Andrew Parker's avatar Andrew Parker
Browse files

Fix mixed content error

Calling the http ajax request from https gave mixed content errors in
some browsers.  Now it will just wait five seconds and redirect like
the http to https.
parent b128a3fc
No related branches found
No related tags found
No related merge requests found
......@@ -52,8 +52,9 @@ $(document).ready(function()
$('#restart_message').show();
is_alive_url = sb_base_url+'/home/is_alive';
// if https is newly enabled or the port changed just wait 5 seconds then redirect. This is because the ajax will fail if the cert is untrusted.
if (sbHttpsEnabled != "False" && sbHttpsEnabled != 0) {
// if https is enabled or you are currently on https and the port or protocol changed just wait 5 seconds then redirect.
// This is because the ajax will fail if the cert is untrusted or the the http ajax requst from https will fail because of mixed content error.
if ((sbHttpsEnabled != "False" && sbHttpsEnabled != 0) || window.location.protocol == "https:") {
if (base_url != sb_base_url) {
timeout_id = 1;
setTimeout(function(){
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment