summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2020-08-17 20:23:48 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2020-08-18 07:43:37 (GMT)
commitad3a466a61ddeab48062eeaa14de8cc2533a1c9b (patch)
treedd317ad79c48907dbcfbf1715920272bfcb62b80
parent3de06b197049c331eb6b2c89903cc5d3538773d7 (diff)
downloadgadjo-ad3a466a61ddeab48062eeaa14de8cc2533a1c9b.zip
gadjo-ad3a466a61ddeab48062eeaa14de8cc2533a1c9b.tar.gz
gadjo-ad3a466a61ddeab48062eeaa14de8cc2533a1c9b.tar.bz2
misc: mark gadjo_sidepage_status cookie as secure and strict (#45937)
-rw-r--r--gadjo/static/js/gadjo.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/gadjo/static/js/gadjo.js b/gadjo/static/js/gadjo.js
index 7d63b3e..4125ab1 100644
--- a/gadjo/static/js/gadjo.js
+++ b/gadjo/static/js/gadjo.js
@@ -310,6 +310,8 @@ var gadjo_js = gadjo_js || {};
date.setTime(date.getTime() + (10 * 86400 * 1000)); /* a long week */
document.cookie = 'gadjo_sidepage_status=' + sidepage_status +
'; expires=' + date.toGMTString() +
+ (window.location.protocol == "https:" && "; Secure" || "") +
+ '; sameSite=Strict' +
'; domain=.' + cookie_domain +
'; path=/';
}