From 7b9bbc4ad51e7a166380e6c97737f26056efa8d1 Mon Sep 17 00:00:00 2001 From: Kieran Date: Fri, 14 Apr 2023 10:46:08 +0100 Subject: [PATCH] bug: passthrough request headers --- functions/e/[id].ts | 1 + functions/p/[id].ts | 1 + 2 files changed, 2 insertions(+) diff --git a/functions/e/[id].ts b/functions/e/[id].ts index 792a4c87..707b7d8a 100644 --- a/functions/e/[id].ts +++ b/functions/e/[id].ts @@ -10,6 +10,7 @@ export const onRequest: PagesFunction = async (context) => { method: "POST", body: await next.arrayBuffer(), headers: { + ...context.request.headers, "content-type": "text/plain" } }); diff --git a/functions/p/[id].ts b/functions/p/[id].ts index dd370fc5..0d7c98e3 100644 --- a/functions/p/[id].ts +++ b/functions/p/[id].ts @@ -10,6 +10,7 @@ export const onRequest: PagesFunction = async (context) => { method: "POST", body: await next.arrayBuffer(), headers: { + ...context.request.headers, "content-type": "text/plain" } });