Skip to content

Commit

Permalink
fix: Fix SSR cookie encoding with multiple setCookie calls
Browse files Browse the repository at this point in the history
Fix SSR cookie encoding with multiple setCookie calls
  • Loading branch information
maticzav committed Oct 22, 2020
2 parents 52a23b5 + 05bdea9 commit a5dddff
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/index.ts
Expand Up @@ -133,6 +133,7 @@ export function setCookie(
if (!areCookiesEqual(parsedCookie, createCookie(name, value, options))) {
cookiesToSet.push(
cookie.serialize(parsedCookie.name, parsedCookie.value, {
encode: (val: string) => val,
...(parsedCookie as cookie.CookieSerializeOptions),
}),
)
Expand Down

0 comments on commit a5dddff

Please sign in to comment.