Skip to content

Commit

Permalink
fix(readRawBody): check req.rawBody before req.body
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Jan 3, 2024
1 parent 53703dc commit 52c0109
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/utils/body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export function readRawBody<E extends Encoding = "utf8">(
event._requestBody ||
event.web?.request?.body ||
(event.node.req as any)[RawBodySymbol] ||
(event.node.req as any).rawBody /* firebase */ ||
(event.node.req as any).body; /* unjs/unenv #8 */
if (_rawBody) {
const promise = Promise.resolve(_rawBody).then((_resolved) => {
Expand Down

0 comments on commit 52c0109

Please sign in to comment.