FIX: Scope the cn to the subfolder

This commit is contained in:
Robin Ward
2018-06-28 11:03:36 -04:00
parent 2c971c41f6
commit fd7bb8e656
3 changed files with 7 additions and 2 deletions
@@ -143,7 +143,8 @@ createWidget("notification-item", {
const id = this.attrs.id;
setTransientHeader("Discourse-Clear-Notifications", id);
if (document && document.cookie) {
document.cookie = `cn=${id}; expires=Fri, 31 Dec 9999 23:59:59 GMT`;
let path = Discourse.BaseUri || "/";
document.cookie = `cn=${id}; path=${path}; expires=Fri, 31 Dec 9999 23:59:59 GMT`;
}
if (wantsNewWindow(e)) {
return;