From 95560f20720d888eee212fadafff6f23e091bef2 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 11 Dec 2023 04:20:35 -0500 Subject: [PATCH] Use 3 MB for Lambda text/plain POST limit The Lambda response is hard-limited to 6 MB, and API JSON is more verbose than BibTeX or RIS, so we need a lower input limit to stay below the response limit. --- src/lambda.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lambda.js b/src/lambda.js index 4e6e46c..bf13a95 100644 --- a/src/lambda.js +++ b/src/lambda.js @@ -51,7 +51,7 @@ app.use( bodyParser({ enableTypes: ['text', 'json'], jsonLimit: '5mb', - textLimit: '5mb', + textLimit: '3mb', }) ); app.use(_.post('/web', WebEndpoint.handle.bind(WebEndpoint)));