sveltekit-adapter-aws icon indicating copy to clipboard operation
sveltekit-adapter-aws copied to clipboard

Correctly handle multiple set-cookie headers

Open H0R5E opened this issue 1 year ago • 1 comments

This PR changes how set-cookies headers with multiple values are returned. Previously, the code looks for Array types in the headers property, but multiple values are actually stored as a comma delimited list.

Following the adapter-netlify approach, the set-cookie-parser package is used here to split the set-cookie header while all other headers are left unchanged.

H0R5E avatar Mar 13 '23 09:03 H0R5E

I have added a version of the PR which includes some Vitest tests in #33, if that's useful.

H0R5E avatar Mar 14 '23 09:03 H0R5E