From 6b3bd86d7f1143d7f6522c078d91768e0094e7fc Mon Sep 17 00:00:00 2001 From: Khue Nguyen Date: Wed, 30 Aug 2023 11:03:55 -0700 Subject: [PATCH] revert req.headers removal --- .../src/adapters/plugins/serverHandler.replacement.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/open-next/src/adapters/plugins/serverHandler.replacement.ts b/packages/open-next/src/adapters/plugins/serverHandler.replacement.ts index 1c16dbbf..04318db9 100644 --- a/packages/open-next/src/adapters/plugins/serverHandler.replacement.ts +++ b/packages/open-next/src/adapters/plugins/serverHandler.replacement.ts @@ -126,9 +126,9 @@ async function handleMiddleware( responseHeaders.forEach((value, key) => { if (key.startsWith(xMiddlewareKey)) { const k = key.substring(xMiddlewareKey.length); - res.headers[k] = value; + res.headers[k] = req.headers[k] = value; } else { - res.headers[key] = value; + res.headers[key] = req.headers[key] = value; } });