Skip to content

Commit

Permalink
fix: transform request header keys to lower case
Browse files Browse the repository at this point in the history
  • Loading branch information
brett-vendia committed Jan 8, 2021
1 parent df60394 commit daa656b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/event-sources/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function getRequestValuesFromEvent ({
let headers = {}
if (event.multiValueHeaders) {
Object.entries(event.multiValueHeaders).forEach(([headerKey, headerValue]) => {
headers[headerKey] = headerValue.join(',')
headers[headerKey.toLowerCase()] = headerValue.join(',')
})
} else {
headers = event.headers
Expand Down Expand Up @@ -65,7 +65,7 @@ function getResponseToService ({
Object.entries(headers).forEach(([headerKey, headerValue]) => {
const headerArray = Array.isArray(headerValue) ? headerValue : [headerValue]

multiValueHeaders[headerKey] = headerArray
multiValueHeaders[headerKey.toLowerCase()] = headerArray
})

return {
Expand Down

0 comments on commit daa656b

Please sign in to comment.