🐛 Add rawBody to every request that n8n does not error if body is missing

This commit is contained in:
Jan Oberhauser 2020-08-27 15:19:10 +02:00
parent 843569f608
commit 7259aa4cf6

View file

@ -297,6 +297,8 @@ class App {
// Make sure that each request has the "parsedUrl" parameter
this.app.use((req: express.Request, res: express.Response, next: express.NextFunction) => {
(req as ICustomRequest).parsedUrl = parseUrl(req);
// @ts-ignore
req.rawBody = new Buffer('', 'base64');
next();
});