Skip to content

Commit

Permalink
lowercase in parseSameSite
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsorban44 committed Oct 23, 2022
1 parent bf950d2 commit d7ec963
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/cookies/src/serialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ function compact<T>(t: T): T {

const SAME_SITE: ResponseCookie['sameSite'][] = ['strict', 'lax', 'none']
function parseSameSite(string: string): ResponseCookie['sameSite'] {
string = string.toLowerCase()
return SAME_SITE.includes(string as any)
? (string as ResponseCookie['sameSite'])
: undefined
Expand Down

0 comments on commit d7ec963

Please sign in to comment.