ui: call logout before login to clear old sessionkey cookies (#4326)

This handle edge cases of upgrades and when legacy UI is used along with
Primate or any UI sharing cookies. The specific case it fixes involves
removal of duplicate sessionkey cookies.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2020-09-17 10:15:11 +05:30 committed by GitHub
parent 44bc134162
commit 6ee6633e6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -280,6 +280,15 @@
var loginCmdText = array1.join("");
// Logout before login is called to purge any duplicate sessionkey cookies
// to handle edge cases around upgrades and using legacy UI with Primate
$.ajax({
url: createURL('logout'),
async: false,
success: function() {},
error: function() {}
});
$.ajax({
type: "POST",
data: "command=login" + loginCmdText + "&response=json",