From 4ccbc1eee78ec33dff7e5216de219c4993199eda Mon Sep 17 00:00:00 2001 From: Steve Date: Thu, 24 Oct 2024 09:23:42 -0400 Subject: [PATCH] fix: Fixed header interpretation for content types --- src/core/gateway/getCid.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/gateway/getCid.ts b/src/core/gateway/getCid.ts index cfab30d..c93438f 100644 --- a/src/core/gateway/getCid.ts +++ b/src/core/gateway/getCid.ts @@ -101,7 +101,8 @@ export const getCid = async ( ); } - const contentType: string | null = request.headers.get("content-type"); + const contentType: string | null = + request.headers.get("content-type")?.split(";")[0] || null; if (contentType?.includes("application/json")) { data = await request.json();