Skip to content

Commit

Permalink
fix(set-cookie): compatible sameSite type with parse
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Jul 18, 2024
1 parent 699f215 commit 2d1c70e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/set-cookie/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function parseSetCookie(
break;
}
case "samesite": {
cookie.sameSite = partValue;
cookie.sameSite = partValue as SetCookie["sameSite"];
break;
}
default: {
Expand Down
2 changes: 1 addition & 1 deletion src/set-cookie/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export interface SetCookie {
/**
* Indicates a cookie ought not to be sent along with cross-site requests
*/
sameSite?: string | undefined;
sameSite?: true | false | "lax" | "strict" | "none" | undefined;

[key: string]: unknown;
}

0 comments on commit 2d1c70e

Please sign in to comment.