summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcin RaczyƄski <marc1n@users.noreply.github.com>2019-11-29 08:46:31 +0100
committerGitHub <noreply@github.com>2019-11-29 08:46:31 +0100
commit07aaf5d4ead0660700a34751274c5c08e78d5b56 (patch)
tree5267abef7daf31c9dcf5ebde81e7d2293e3f9d49 /src
parenta5712d73498be29b03d4d15dfcee21c2ed45ce1a (diff)
downloadwebob-07aaf5d4ead0660700a34751274c5c08e78d5b56.tar.gz
#406 set_cookie allows samesite='none' value
Diffstat (limited to 'src')
-rw-r--r--src/webob/cookies.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/webob/cookies.py b/src/webob/cookies.py
index 8f0ffd5..8a186e0 100644
--- a/src/webob/cookies.py
+++ b/src/webob/cookies.py
@@ -277,8 +277,8 @@ def serialize_cookie_date(v):
def serialize_samesite(v):
v = bytes_(v)
- if v.lower() not in (b"strict", b"lax"):
- raise ValueError("SameSite must be 'Strict' or 'Lax'")
+ if v.lower() not in (b"strict", b"lax", b"none"):
+ raise ValueError("SameSite must be 'strict', 'lax', or 'none'")
return v
@@ -547,8 +547,8 @@ def make_cookie(
Set a comment on the cookie. Default: ``None``
``samesite``
- The 'SameSite' attribute of the cookie, can be either ``"Strict"``,
- ``"Lax"``, or ``None``.
+ The 'SameSite' attribute of the cookie, can be either ``"strict"``,
+ ``"lax"``, ``"none"`` or ``None``.
"""
# We are deleting the cookie, override max_age and expires
@@ -763,8 +763,8 @@ class CookieProfile(object):
session cookie. Default: ``False``.
``samesite``
- The 'SameSite' attribute of the cookie, can be either ``b"Strict"``,
- ``b"Lax"``, or ``None``.
+ The 'SameSite' attribute of the cookie, can be either ``b"strict"``,
+ ``b"lax"``, ``b"none"``, or ``None``.
``path``
The path used for the session cookie. Default: ``'/'``.
@@ -1020,8 +1020,8 @@ class SignedCookieProfile(CookieProfile):
session cookie. Default: ``False``.
``samesite``
- The 'SameSite' attribute of the cookie, can be either ``b"Strict"``,
- ``b"Lax"``, or ``None``.
+ The 'SameSite' attribute of the cookie, can be either ``b"strict"``,
+ ``b"lax"``, ``b"none"``, or ``None``.
``path``
The path used for the session cookie. Default: ``'/'``.