Skip to content

Commit

Permalink
Add parameters to del_cookie() (#8956)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamsorcerer authored Aug 31, 2024
1 parent 51ea3b3 commit 9738426
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES/8956.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added ``secure``/``httponly``/``samesite`` parameters to ``.del_cookie()`` -- by :user:`Dreamsorcerer`.
12 changes: 11 additions & 1 deletion aiohttp/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,14 @@ def set_cookie(
)

def del_cookie(
self, name: str, *, domain: Optional[str] = None, path: str = "/"
self,
name: str,
*,
domain: Optional[str] = None,
path: str = "/",
secure: Optional[bool] = None,
httponly: Optional[bool] = None,
samesite: Optional[str] = None,
) -> None:
"""Delete cookie.
Expand All @@ -1044,6 +1051,9 @@ def del_cookie(
expires="Thu, 01 Jan 1970 00:00:00 GMT",
domain=domain,
path=path,
secure=secure,
httponly=httponly,
samesite=samesite,
)


Expand Down

0 comments on commit 9738426

Please sign in to comment.