diff --git a/ui/scripts/cloud.core.callbacks.js b/ui/scripts/cloud.core.callbacks.js index a081294293c..7fd1b4d1244 100644 --- a/ui/scripts/cloud.core.callbacks.js +++ b/ui/scripts/cloud.core.callbacks.js @@ -73,10 +73,10 @@ $(document).ready(function() { } }); } - else if(window.name != null && window.name.indexOf("command=login") != -1) { //from region switching + else if(window.name != null && window.name.indexOf("&domain=") != -1) { //from region switching g_loginCmdText = window.name; $.ajax({ - url: clientApiUrl + "?" + window.name, + url: clientApiUrl + "?command=login" + window.name + "&response=json", dataType: "json", async: false, success: function(json) { diff --git a/ui/scripts/cloudStack.js b/ui/scripts/cloudStack.js index 499cb833040..faa77899da1 100644 --- a/ui/scripts/cloudStack.js +++ b/ui/scripts/cloudStack.js @@ -250,12 +250,12 @@ else { array1.push("&domain=" + encodeURIComponent("/")); } - - g_loginCmdText = "command=login" + array1.join("") + "&response=json"; + + g_loginCmdText = array1.join(""); $.ajax({ type: "POST", - data: g_loginCmdText, + data: "command=login" + g_loginCmdText + "&response=json", dataType: "json", async: false, success: function(json) { @@ -466,7 +466,7 @@ document.title = 'CloudStack'; if ($.urlParam('loginUrl') != 0 - ||(window.name != null && window.name.indexOf("command=login") != -1)) { + ||(window.name != null && window.name.indexOf("&domain=") != -1)) { // SSO loginArgs.hideLoginScreen = true; }