This repository was archived by the owner on May 21, 2025. It is now read-only.
This repository was archived by the owner on May 21, 2025. It is now read-only.
MultiValueHeaders and hardcoded host header extraction #211
Open
Description
Hello!
I think the logic within the line 118 in requestALB.go should also account for multivalueheaders!! This causes issues with https redirects! As the host header will be missing if the lambda is connected to an alb with multivalue headers included.
serverAddress := "https://" + req.Headers["host"]
Issue with redirect would look like: "https:///path" instead of "https://host/path"!!!
I know that multivalueheaders indicate the possibility of multiple values. But I think some logic should be implemented for the host header at least (take the first value).
New code to look something like:
`
host := req.Headers["host"]
if value, ok := req.MultiValueHeaders["host"]; ok && len(value) > 0 {
host = value[0]
}
serverAddress := "https://" + host
`
Metadata
Metadata
Assignees
Labels
No labels