mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fix: Use SameSite=Lax on cookies
This commit is contained in:
parent
fb1fb2ef3b
commit
f10732960c
3 changed files with 50 additions and 14 deletions
|
@ -5,15 +5,13 @@ from aurweb import config
|
|||
|
||||
|
||||
def samesite() -> str:
|
||||
""" Produce cookie SameSite value based on options.disable_http_login.
|
||||
""" Produce cookie SameSite value.
|
||||
|
||||
When options.disable_http_login is True, "strict" is returned. Otherwise,
|
||||
"lax" is returned.
|
||||
Currently this is hard-coded to return "lax"
|
||||
|
||||
:returns "strict" if options.disable_http_login else "lax"
|
||||
:returns "lax"
|
||||
"""
|
||||
secure = config.getboolean("options", "disable_http_login")
|
||||
return "strict" if secure else "lax"
|
||||
return "lax"
|
||||
|
||||
|
||||
def timeout(extended: bool) -> int:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue