Fix cross-domain cookie issue
This commit is contained in:
parent
ced68d9304
commit
93d5980f05
7 changed files with 31 additions and 7 deletions
|
|
@ -445,6 +445,20 @@ Callbacks = {
|
|||
|
||||
if (!CLIENT.guest) {
|
||||
socket.emit("initUserPLCallbacks");
|
||||
var logoutform = $("<p/>").attr("id", "logoutform")
|
||||
.addClass("navbar-text pull-right")
|
||||
.insertAfter($("#loginform"));
|
||||
|
||||
$("<span/>").attr("id", "welcome").text("Welcome, " + CLIENT.name)
|
||||
.appendTo(logoutform);
|
||||
$("<span/>").html(" · ").appendTo(logoutform);
|
||||
var domain = $("#loginform").attr("action").replace("/login", "");
|
||||
$("<a/>").attr("id", "logout")
|
||||
.attr("href", domain + "/logout?redirect=/r/" + CHANNEL.name)
|
||||
.text("Logout")
|
||||
.appendTo(logoutform);
|
||||
|
||||
$("#loginform").remove();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue