From a244d7f1ce82890d0854e397b86e1a8efb38ddc4 Mon Sep 17 00:00:00 2001 From: Varrience <105261606+Varrience@users.noreply.github.com> Date: Sun, 26 Jan 2025 17:55:15 -0500 Subject: [PATCH] idk why requests are being 502'd it was majoritively the rate limit since it happens less now but the fact that it has been happening is not good i'll possibly put in a bug report later about the issue for now leaving the rate limit commented out --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index e070f74..937e1fc 100644 --- a/index.js +++ b/index.js @@ -42,7 +42,7 @@ connectDB(); */ const bigPaths = new RegExp(`^/datablock_storage/[^/]+/(${["populate_key_values", "populate_tables"].join("|")})`); app.use((req, res, next) => { - const maxSize = "100kb"; // req.path.match(bigPaths) !== null ? "10mb": "100kb"; + const maxSize = req.path.match(bigPaths) !== null ? "10mb": "100kb"; express.json({limit: maxSize})(req, res, next); }); // Parse JSON request bodies app.use(cookieParser()); // Parse cookies attached to the Client request