dougmoscrop / serverless-http

Use your existing middleware framework (e.g. Express, Koa) in AWS Lambda 🎉
Other
1.72k stars 165 forks source link

cookies not working in API Gateway HTTP API #185

Closed ivowork closed 3 years ago

ivowork commented 3 years ago

Hi,

I've been testing this very useful package but noticed that I cannot set cookies.

I'm using the new HTTP APIs from AWS API Gateway and the following note in their documentation might explain why:

Format 2.0 doesn't have multiValueHeaders or multiValueQueryStringParameters fields. Duplicate headers are combined with commas and included in the headers field. Duplicate query strings are combined with commas and included in the queryStringParameters field.

Format 2.0 includes a new cookies field. All cookie headers in the request are combined with commas and added to the cookies field. In the response to the client, each cookie becomes a set-cookie header.

https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html

ivowork commented 3 years ago

sorry, seems to be fixed in 2.6.0 via #160