1
mirror of https://gitlab.com/commento/commento.git synced 2025-06-29 22:56:37 -04:00

everywhere: allow subdir-ed origin setups

Closes https://gitlab.com/commento/commento-ce/issues/61
This commit is contained in:
Adhityaa Chandrasekar
2018-08-08 12:16:27 +05:30
parent ee324c1f28
commit 6ed44db56b
15 changed files with 49 additions and 35 deletions

View File

@ -7,14 +7,14 @@
};
if (json.ownerToken === undefined) {
document.location = "/login";
document.location = global.commentoOrigin + "/login";
return;
}
global.post(global.commentoOrigin + "/api/owner/self", json, function(resp) {
if (!resp.success || !resp.loggedIn) {
global.cookieDelete("commentoOwnerToken");
document.location = "/login";
document.location = global.commentoOrigin + "/login";
return;
}