aws / aws/aws-lambda-go

lambdaurl Wrap is not proxying `LambdaFunctionURLRequest.Cookies`

Open
#597 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
3.8k
Forks
578
Avg merge
8h 18m
Merged PRs (30d)
1

Description

**Is your feature request related to a problem? Please describe.**
The `Wrap` function from https://github.com/aws/aws-lambda-go/blob/main/lambdaurl/http_handler.go#L105 creates an `http.Request` from an `events.LambdaFunctionURLRequest`. I don't see any references to proxying the original request's cookies similar to what [aws-lambda-go-api-proxy](https://github.com/awslabs/aws-lambda-go-api-proxy/blob/master/core/requestv2.go#L169C1-L173C1) does:
```go

for _, cookie := range req.Cookies {
httpRequest.Header.Add("Cookie", cookie)
}

```

This is a deal-breaker for me because my stream handlers rely on cookies

**Describe the solution you'd like**
Copy and paste that code block (I'll do this with a PR after creating this issue).

**Describe alternatives you've considered**
I don't think this module would like to take a dependency on `aws-lambda-go-api-proxy` so copying and pasting may be best.

**Additional context**
None.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.