Skip to content

Commit

Permalink
convert cookie sameSite true to strict
Browse files Browse the repository at this point in the history
  • Loading branch information
Heinrich-Barth committed Jan 9, 2025
1 parent dd44c3f commit 9f1a466
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/cookies/src/serialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ export function stringifyCookie(c: ResponseCookie | RequestCookie): string {
'domain' in c && c.domain && `Domain=${c.domain}`,
'secure' in c && c.secure && 'Secure',
'httpOnly' in c && c.httpOnly && 'HttpOnly',
'sameSite' in c && c.sameSite && `SameSite=${c.sameSite}`,
'sameSite' in c &&
c.sameSite &&
`SameSite=${c.sameSite === true ? 'strict' : c.sameSite}`,
'partitioned' in c && c.partitioned && 'Partitioned',
'priority' in c && c.priority && `Priority=${c.priority}`,
].filter(Boolean)
Expand Down

0 comments on commit 9f1a466

Please sign in to comment.