Skip to content
Snippets Groups Projects
Commit aa796974 authored by Johan de Klerk's avatar Johan de Klerk
Browse files

Merge branch 'main' of gitlab.bob.co.za:bob-public-utils/bobgroup-go-utils

parents 6ae5500c 12cc844a
No related branches found
No related tags found
No related merge requests found
......@@ -37,12 +37,20 @@ func ServeHTTPFunctions(ctx context.Context, lambdaHandler lambda.Handler, w htt
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
request := events.APIGatewayProxyRequest{
Resource: req.URL.Path,
HTTPMethod: req.Method,
QueryStringParameters: query,
Body: body,
Headers: headers,
}
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