Skip to content
Snippets Groups Projects
Commit 12cc844a authored by Francé Wilke's avatar Francé Wilke
Browse files

Fix headers

parent 18fc59ea
Branches
Tags v1.103.0
No related merge requests found
...@@ -37,12 +37,20 @@ func ServeHTTPFunctions(lambdaHandler lambda.Handler, w http.ResponseWriter, req ...@@ -37,12 +37,20 @@ func ServeHTTPFunctions(lambdaHandler lambda.Handler, w http.ResponseWriter, req
query[key] = values[0] query[key] = values[0]
} }
headers := map[string]string{}
for key, values := range req.Header {
if len(values) > 0 {
headers[key] = values[0]
}
}
// Call lambda function // Call lambda function
request := events.APIGatewayProxyRequest{ request := events.APIGatewayProxyRequest{
Resource: req.URL.Path, Resource: req.URL.Path,
HTTPMethod: req.Method, HTTPMethod: req.Method,
QueryStringParameters: query, QueryStringParameters: query,
Body: body, Body: body,
Headers: headers,
} }
jsonRequest, _ := json.Marshal(request) jsonRequest, _ := json.Marshal(request)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment