Skip to content

Commit 7fe21db

Browse files
committed
🍪 httponly
1 parent 8697284 commit 7fe21db

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

an_website/utils/base_request_handler.py

+3
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,9 @@ def set_cookie( # noqa: D102 # pylint: disable=too-many-arguments
959959
expires: None | float | tuple[int, ...] | datetime = None,
960960
path: str = "/",
961961
expires_days: None | float = 400, # changed
962+
*,
962963
secure: bool | None = None,
964+
httponly: bool = True,
963965
**kwargs: Any,
964966
) -> None:
965967
if "samesite" not in kwargs:
@@ -976,6 +978,7 @@ def set_cookie( # noqa: D102 # pylint: disable=too-many-arguments
976978
secure=(
977979
self.request.protocol == "https" if secure is None else secure
978980
),
981+
httponly=httponly,
979982
**kwargs,
980983
)
981984

0 commit comments

Comments
 (0)