awslabs / aws-lambda-go-api-proxy

lambda-go-api-proxy makes it easy to port APIs written with Go frameworks such as Gin (https://gin-gonic.github.io/gin/ ) to AWS Lambda and Amazon API Gateway.
Apache License 2.0
1.04k stars 197 forks source link

Properly set apigwv2 response headers #99

Closed jccguimaraes closed 3 years ago

jccguimaraes commented 3 years ago

Tackles issues #60 and #75.

APIGatewayV2HTTPResponse expects the Headers to be in the form of Content-Type: application/json or Content-Type: application/json,text-plain.

Taken from AWS documentation here:

Request parameter mapping values

Type Syntax Notes
Header value $request.header.name Header names are case-insensitive. API Gateway combines multiple header values with commas, for example "header1": "value1,value2". Some headers are reserved. To learn more, see Reserved headers.

97 tries to fix this issue but is missing some changes and tests to back it up. So I am opening another one.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

jccguimaraes commented 3 years ago

@sapessi sorry for tagging, did you by any chance had the time to look at this PR? thanks 🙏🏼

sapessi commented 3 years ago

Apologies for the delay. Merged. I'll go over the other PRs and tag a release by the end of the week.

jccguimaraes commented 3 years ago

Apologies for the delay. Merged. I'll go over the other PRs and tag a release by the end of the week.

Thank you so much!

jccguimaraes commented 3 years ago

@sapessi any expectation when a new release will be available? Thanks

sapessi commented 3 years ago

Just tagged 0.11.0