Skip to content

Commit

Permalink
fix: Sliced charset from content type header
Browse files Browse the repository at this point in the history
  • Loading branch information
stevedylandev committed Oct 24, 2024
1 parent e89310a commit 6f5a265
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 @@ -137,7 +137,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 6f5a265

Please sign in to comment.