Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add code to convert ALB events to http.Request and http.ResponseWriter #159

Merged
merged 2 commits into from
Feb 6, 2023

Conversation

arentta
Copy link
Contributor

@arentta arentta commented Jan 17, 2023

Addition of code in the core library of RequestAccessorALB and ProxyResponseWriterALB . These 2 types will allow conversion of ALBTargetGroupRequest and ALBTargetGroupResponse to http.Request and http.ResponseWriter. This core library allows for easy integration with common go frameworks such as Gin, Fiber or Routers like negroni or Gorillamux. Samples for just ALB will be added in seperate folder for now. I was not sure this code goes in this library. Maybe aws-lambda-go-alb-proxy makes more sense?

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

@arentta
Copy link
Contributor Author

arentta commented Jan 17, 2023

Adding adapter code changes for processing of ALB events

@sapessi sapessi merged commit bf16974 into awslabs:master Feb 6, 2023
if queryString != "" {
queryString += "&"
}
queryString += url.QueryEscape(q) + "=" + url.QueryEscape(v)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think req.MultiValueQueryStringParameters carries raw (already escaped) values

Suggested change
queryString += url.QueryEscape(q) + "=" + url.QueryEscape(v)
queryString += q + "=" + v

#203

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants