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:
@ -5,7 +5,7 @@
|
||||
// cookie is deleted.
|
||||
global.loggedInRedirect = function() {
|
||||
if (global.cookieGet("commentoOwnerToken") !== undefined)
|
||||
document.location = "/dashboard";
|
||||
document.location = global.commentoOrigin + "/dashboard";
|
||||
}
|
||||
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
domainDelete(data.domains[data.cd].domain, function(success) {
|
||||
if (success)
|
||||
document.location = '/dashboard';
|
||||
document.location = global.commentoOrigin + '/dashboard';
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@
|
||||
}
|
||||
|
||||
global.cookieSet("commentoOwnerToken", resp.ownerToken);
|
||||
document.location = "/dashboard";
|
||||
document.location = global.commentoOrigin + "/dashboard";
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
global.logout = function() {
|
||||
global.cookieSet("commentoOwnerToken", "");
|
||||
document.location = "/login";
|
||||
document.location = global.commentoOrigin + "/login";
|
||||
}
|
||||
|
||||
} (window, document));
|
||||
|
@ -30,7 +30,7 @@
|
||||
return
|
||||
}
|
||||
|
||||
document.location = "/login?changed=true";
|
||||
document.location = global.commentoOrigin + "/login?changed=true";
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -34,9 +34,9 @@
|
||||
}
|
||||
|
||||
if (resp.confirmEmail)
|
||||
document.location = "/confirm-email";
|
||||
document.location = global.commentoOrigin + "/confirm-email";
|
||||
else
|
||||
document.location = "/login?signedUp=true";
|
||||
document.location = global.commentoOrigin + "/login?signedUp=true";
|
||||
});
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user