MikeBild / sveltekit-adapter-aws

A SvelteKit adapter for AWS using the AWS-CDK
MIT License
135 stars 33 forks source link

Correctly handle multiple set-cookie headers #32

Open H0R5E opened 1 year ago

H0R5E commented 1 year ago

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 commented 1 year ago

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