Skip to content

Commit

Permalink
Merge pull request #487 from netlify/raees/functions-multivalue-headers
Browse files Browse the repository at this point in the history
Functions: Add support for multi-value headers
  • Loading branch information
RaeesBhatti authored Aug 25, 2019
2 parents 8ac8f6b + 1f2e2a2 commit 7de8cb8
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 7de8cb8

Please sign in to comment.