Fix crash with express 5
express.json does not enforce json. this means it will pass it through but let req.body be undefined. this causes all our asserts to crash
This commit is contained in:
@@ -41,7 +41,7 @@ async function initializeExpressSync() {
|
||||
|
||||
const REQUEST_TIMEOUT = 60000; // timeout for all requests (see also setTimeout on the httpServer)
|
||||
|
||||
const json = express.json({ strict: true, limit: QUERY_LIMIT }); // application/json
|
||||
const json = middleware.json({ strict: true, limit: QUERY_LIMIT }); // forces json content-type
|
||||
|
||||
app.set('json spaces', 2); // pretty json
|
||||
app.enable('trust proxy'); // trust the X-Forwarded-* headers
|
||||
|
||||
Reference in New Issue
Block a user