Skip to content

Commit 3f6def6

Browse files
committed
Fix #1417: Set sameSite=Lax by default
1 parent 176614a commit 3f6def6

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

debug_toolbar/static/debug_toolbar/js/toolbar.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,9 @@ const djdt = {
270270
options.path ? "; path=" + options.path : "",
271271
options.domain ? "; domain=" + options.domain : "",
272272
options.secure ? "; secure" : "",
273+
"sameSite" in options
274+
? "; sameSite=" + options.samesite
275+
: "; sameSite=Lax",
273276
].join("");
274277

275278
return value;

docs/changes.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Change log
22
==========
33

4+
Next version
5+
------------
6+
7+
* Changed ``djdt.cookie.set()`` to set ``sameSite=Lax`` by default if
8+
callers do not provide a value.
9+
10+
411
3.2 (2020-12-03)
512
----------------
613

0 commit comments

Comments
 (0)