Closed aryounce closed 3 years ago
I should also note that although MultiValueHeaders
is a field in APIGatewayV2HTTPResponse
the API Gateway documentation does not mention it as a part of v2 responses from Lambda integrations. See: Working with AWS Lambda proxy integrations for HTTP APIs, specifically: Lambda function response for format 2.0
To customize the response, your Lambda function should return a response with the following format.
{ "cookies" : ["cookie1", "cookie2"], "isBase64Encoded": true|false, "statusCode": httpStatusCode, "headers": { "headername": "headervalue", ... }, "body": "Hello from Lambda!" }
Closing as this is addressed by #99.
This fix is related to #60 and possibly #75.
Description of changes:
The value for
events.APIGatewayV2HTTPResponse.MultiValueHeaders
is not being used by API Gateway v2 HTTP API instances and thus the returned headers are not passed through to the client. This change adds the value of each header inProxyResponseWriterV2
to theevents.APIGatewayV2HTTPResponse.Headers
struct field.ProxyResponseWriterV2.headers
.events.APIGatewayV2HTTPResponse
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.