Skip to content

Commit

Permalink
fix: Fixed header interpretation for content types
Browse files Browse the repository at this point in the history
  • Loading branch information
stevedylandev committed Oct 24, 2024
1 parent 9c8a5ae commit 4ccbc1e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/gateway/getCid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 4ccbc1e

Please sign in to comment.