Description
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.
I have a use case, where I need to pass several set-cookie
headers in the response from Lambda to API Gateway 2.0 using the lambda-http
crate. However, when I set multiple SET_COOKIE
headers on the response, only one of them is returned from API Gateway, presumably since API Gateway only handles the one header which is present in the headers
field of LambdaResponse
.
Is there a way to work around this other than adding the cookies
field as part of the LambdaResponse
in some manner, like using a similar enum as LambdaRequest
for different API Gateway versions?