From 1f2e2a2ea506c4349ea840078358ef82df7d9c86 Mon Sep 17 00:00:00 2001 From: Raees Iqbal Date: Sun, 25 Aug 2019 11:26:33 +0500 Subject: [PATCH] Functions: Add support for multi-value headers --- src/utils/serve-functions.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/utils/serve-functions.js b/src/utils/serve-functions.js index 31afb4a5f41..e319a5d5b4c 100644 --- a/src/utils/serve-functions.js +++ b/src/utils/serve-functions.js @@ -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")