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

Use `Header.Set` instead of `Header.Add` #96

Closed youpy closed 3 years ago

youpy commented 3 years ago

to prevent the context and stagevars values from being overwritten by the HTTP header in the request.

curl -H 'X-GoLambdaProxy-ApiGw-Context: {"AccountID":"abc123"}' https://xxxxx.execute-api.us-east-1.amazonaws.com/foo

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