From 924613a9d144a2a8d70f41e5a83066da34bea71a Mon Sep 17 00:00:00 2001 From: Lorgio Jimenez Date: Thu, 19 Jul 2018 14:18:45 -0400 Subject: [PATCH] =?UTF-8?q?Added=20path=20to=20cookie=20setter=20so=20that?= =?UTF-8?q?=20every=20new=20path=20doesn=E2=80=99t=20create=20a=20new=20co?= =?UTF-8?q?okie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/xdomain_cookie.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 55d9919..8d5aca5 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,6 @@ "mocha": "^2.4.5", "run-sequence": "^1.2.2", "serve-static": "^1.10.2", - "zombie": "^4.2.1" + "zombie": "^5.0.8" } } diff --git a/src/xdomain_cookie.js b/src/xdomain_cookie.js index 3aed312..aed2d75 100644 --- a/src/xdomain_cookie.js +++ b/src/xdomain_cookie.js @@ -106,7 +106,7 @@ function _set_local_cookie( cookie_name, cookie_value, expires_days ){ var d = new Date(); d.setTime(d.getTime() + ( expires_days*1000*60*60*24) ); - var cookie_val = cookie_name + "=" + cookie_value + "; expires="+d.toUTCString() + (_secure_only ? ";secure" : ""); + var cookie_val = cookie_name + "=" + cookie_value + "; expires="+d.toUTCString() + (_secure_only ? ";secure" : "") + "; path=/"; _log("_set_local_cookie", cookie_val); document.cookie = cookie_val; }