-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting multiple cookie in same request not working #604
Comments
Thank you for opening this issue! I have confirmed that the problem occurs. 1. Buffered ResponseIt appears that the sveltekit-adapter-aws/embed/arch/lambda-s3-buffered.ts Lines 49 to 53 in 3f7976e
It is planned to be implemented in v1.6.0. 2. Streaming ResponseI did some research, but couldn't find a workaround. https://aws.amazon.com/blogs/compute/introducing-aws-lambda-response-streaming/ It seems like there needs to be a way to set cookies other than using standard headers. sveltekit-adapter-aws/embed/external/utils/qualified.ts Lines 6 to 21 in 3f7976e
Does anyone know a solution regarding this? |
|
After researching, it seems that with Lambda@edge and streaming responses, only a single key can be specified in HTTP headers, and multiple cookies cannot be returned. This is an issue with the AWS Lambda platform and seems difficult to work around. |
It was possible to return multiple headers with Lambda@Edge. |
It was possible to return multiple cookies with streaming response. |
If we set more than one cookie in the same request, only the last one is used.
For example
cookies.set('first', 'true', { path: '/' });
cookies.set('second', 'selected', { path: '/' });
Only the 'second' cookie is in the response and 'first' is ignored. Is it related to sveltejs/kit#3460 (comment)
The text was updated successfully, but these errors were encountered: