Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions lambdaurl/http_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,17 @@ func Wrap(handler http.Handler) func(context.Context, *events.LambdaFunctionURLR
return nil, err
}
httpRequest.RemoteAddr = request.RequestContext.HTTP.SourceIP
hasCookie := false
for k, v := range request.Headers {
httpRequest.Header.Add(k, v)
if strings.ToLower(k) == "cookie" {
hasCookie = true
}
}
if !hasCookie {
for _, cookie := range request.Cookies {
httpRequest.Header.Add("Cookie", cookie)
}
}

ready := make(chan header) // Signals when it's OK to start returning the response body to Lambda
Expand Down
Loading