From 7359f9075e4a73a420c8a9ef5151bc0958c1dd6d Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Sat, 26 Oct 2019 17:37:24 +0200 Subject: [PATCH] Port increase limit of Json payloads to master server The default limit of 100kb to JSON payloads of bodyParser can be exceeded when running modded games with researchSync. Increase the limit to 10mb as a bandaid to fix this issue. This is a port of 25eb5e5. --- CHANGELOG.md | 2 ++ master.js | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aca225d7..64d8b5d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -69,6 +69,8 @@ Version 1.2.3 - Disabled uploading mods to the master server by default as this is mostly just a waste of bandwidth with the mod portal being integrated into the game now. +- Fixed researchSync breaking with heavily modded games due to the tech tree + exceeding the default 100kb limit on JSON payloads. Version 1.2.2 diff --git a/master.js b/master.js index a154a6d9..81d02ed8 100644 --- a/master.js +++ b/master.js @@ -47,7 +47,9 @@ const fileUpload = require('express-fileupload'); var app = express(); app.use(cookieParser()); -app.use(bodyParser.json()); +app.use(bodyParser.json({ + limit: '10mb', +})); app.use(bodyParser.urlencoded({ parameterLimit: 100000, limit: '10mb',