Skip to content

Commit

Permalink
Merge pull request #4 from PinataCloud/fix/gateway-content-type
Browse files Browse the repository at this point in the history
fix: Fixed header interpretation for content types
  • Loading branch information
stevedylandev authored Oct 24, 2024
2 parents 9c8a5ae + 4ccbc1e commit 078aeb2
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 078aeb2

Please sign in to comment.