From b26baa902fbc15f2014410684ba20740014a81f0 Mon Sep 17 00:00:00 2001 From: Jan Oberhauser Date: Fri, 28 Aug 2020 18:15:34 +0200 Subject: [PATCH] :bug: Add missing rawBody for "application/x-www-form-urlencoded" --- packages/cli/src/Server.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/Server.ts b/packages/cli/src/Server.ts index 9ff844d36e..c06795d209 100644 --- a/packages/cli/src/Server.ts +++ b/packages/cli/src/Server.ts @@ -340,7 +340,12 @@ class App { })); //support application/x-www-form-urlencoded post data - this.app.use(bodyParser.urlencoded({ extended: false })); + this.app.use(bodyParser.urlencoded({ extended: false, + verify: (req, res, buf) => { + // @ts-ignore + req.rawBody = buf; + } + })); if (process.env['NODE_ENV'] !== 'production') { this.app.use((req: express.Request, res: express.Response, next: express.NextFunction) => {