Skip to content

Commit

Permalink
🍪 httponly
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshix-1 committed Feb 15, 2025
1 parent 8697284 commit 7fe21db
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions an_website/utils/base_request_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,9 @@ def set_cookie( # noqa: D102 # pylint: disable=too-many-arguments
expires: None | float | tuple[int, ...] | datetime = None,
path: str = "/",
expires_days: None | float = 400, # changed
*,
secure: bool | None = None,
httponly: bool = True,
**kwargs: Any,
) -> None:
if "samesite" not in kwargs:
Expand All @@ -976,6 +978,7 @@ def set_cookie( # noqa: D102 # pylint: disable=too-many-arguments
secure=(
self.request.protocol == "https" if secure is None else secure
),
httponly=httponly,
**kwargs,
)

Expand Down

0 comments on commit 7fe21db

Please sign in to comment.