From af3cd9933d7add1bebe188de100c3097610cab6b Mon Sep 17 00:00:00 2001 From: Eddy Chen <89349085+ecxyzzy@users.noreply.github.com> Date: Sun, 10 Sep 2023 22:02:20 -0700 Subject: [PATCH] =?UTF-8?q?fix(lambda-core):=20=F0=9F=90=9B=20add=20header?= =?UTF-8?q?=20on=20successful=20compress?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/lambda/src/response.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/lambda/src/response.ts b/libs/lambda/src/response.ts index d3f891c0..a4e90d62 100644 --- a/libs/lambda/src/response.ts +++ b/libs/lambda/src/response.ts @@ -53,6 +53,10 @@ export function createOKResult( try { const { body, method } = compress(JSON.stringify(response), requestHeaders["accept-encoding"]); + if (method) { + headers["content-encoding"] = method; + } + logger.info("200 OK"); return {