Skip to content

Commit

Permalink
fix: fix getRequestValuesFromEvent headers
Browse files Browse the repository at this point in the history
  • Loading branch information
brett-vendia committed Jan 7, 2021
1 parent 395c8ec commit f915e94
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/event-sources/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ function getEventBody ({
function getRequestValuesFromEvent ({
event,
method = event.httpMethod,
path = getPathWithQueryStringParams({ event }),
headers
path = getPathWithQueryStringParams({ event })
}) {
if (!headers) {
headers = {}
let headers = {}
if (event.multiValueHeaders) {
Object.entries(event.multiValueHeaders).forEach(([headerKey, headerValue]) => {
headers[headerKey] = headerValue.join(',')
})
} else {
headers = event.headers
}

let body
Expand Down

0 comments on commit f915e94

Please sign in to comment.