Skip to content

Commit

Permalink
Functions: Add support for multi-value headers
Browse files Browse the repository at this point in the history
  • Loading branch information
RaeesBhatti committed Aug 25, 2019
1 parent 8ac8f6b commit 1f2e2a2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/utils/serve-functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ function createHandler(dir) {
for (const key in lambdaResponse.headers) {
response.setHeader(key, lambdaResponse.headers[key]);
}
for (const key in lambdaResponse.multiValueHeaders) {
const items = lambdaResponse.multiValueHeaders[key];
response.setHeader(key, items);
}
response.write(
lambdaResponse.isBase64Encoded
? Buffer.from(lambdaResponse.body, "base64")
Expand Down

0 comments on commit 1f2e2a2

Please sign in to comment.