From bfe12d8a62ec29a83a20f09dc3d51419fffbf517 Mon Sep 17 00:00:00 2001 From: Farzad Shafiee Date: Sun, 7 Apr 2024 23:08:00 -0400 Subject: [PATCH] Use AstroCookieSetOptions to construct AstroCookieDeleteOptions --- .changeset/shaggy-cats-film.md | 10 ++++++++-- packages/astro/src/core/cookies/cookies.ts | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.changeset/shaggy-cats-film.md b/.changeset/shaggy-cats-film.md index 23a7020244e78..d69958bc3c1df 100644 --- a/.changeset/shaggy-cats-film.md +++ b/.changeset/shaggy-cats-film.md @@ -1,5 +1,11 @@ --- -"astro": patch +"astro": minor --- -Accept standard cookie attributes when deleting a cookie +Extends the acceptable cookie options when deleting a cookie, to the following attribute: + +- `domain` +- `path` +- `httpOnly` *(Added)* +- `sameSite` *(Added)* +- `secure` *(Added)* diff --git a/packages/astro/src/core/cookies/cookies.ts b/packages/astro/src/core/cookies/cookies.ts index 2657683f2101d..069afc796e9c2 100644 --- a/packages/astro/src/core/cookies/cookies.ts +++ b/packages/astro/src/core/cookies/cookies.ts @@ -11,7 +11,7 @@ export interface AstroCookieGetOptions { decode?: (value: string) => string; } -type AstroCookieDeleteOptions = Omit; +type AstroCookieDeleteOptions = Omit; interface AstroCookieInterface { value: string;