diff --git a/starlette/responses.py b/starlette/responses.py index d03df2329..9dbe03beb 100644 --- a/starlette/responses.py +++ b/starlette/responses.py @@ -125,8 +125,25 @@ def set_cookie( cookie_val = cookie.output(header="").strip() self.raw_headers.append((b"set-cookie", cookie_val.encode("latin-1"))) - def delete_cookie(self, key: str, path: str = "/", domain: str = None) -> None: - self.set_cookie(key, expires=0, max_age=0, path=path, domain=domain) + def delete_cookie( + self, + key: str, + path: str = "/", + domain: str = None, + secure: bool = False, + httponly: bool = False, + samesite: str = "lax", + ) -> None: + self.set_cookie( + key, + max_age=0, + expires=0, + path=path, + domain=domain, + secure=secure, + httponly=httponly, + samesite=samesite, + ) async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None: await send(