diff --git a/src/utils/body.ts b/src/utils/body.ts index 76024deb..11d7f3a3 100644 --- a/src/utils/body.ts +++ b/src/utils/body.ts @@ -165,7 +165,7 @@ export async function readBodySafe>( return (event.node.req as any)[ParsedBodySymbol] as Infer; } const contentType = getRequestHeader(event, "content-type"); - if (contentType === "application/x-www-form-urlencoded") { + if (contentType?.startsWith("application/x-www-form-urlencoded")) { const formPayload = Object.fromEntries(await readFormData(event)); const result = await assertSchema(schema, formPayload, onError); (event.node.req as any)[ParsedBodySymbol] = result;