From b9e88c79989ac9bd4a560c99ebc418d3aff00c6f Mon Sep 17 00:00:00 2001 From: Douglas Lovell Date: Tue, 5 Mar 2019 11:44:05 -0300 Subject: [PATCH] Merge remote-tracking branch 'origin/bg-accept-larger-document-size-on-api-requests' GitOrigin-RevId: b06511daa7000878646f5cb8132d6077304f5f8c --- services/web/app/coffee/infrastructure/Server.coffee | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/services/web/app/coffee/infrastructure/Server.coffee b/services/web/app/coffee/infrastructure/Server.coffee index 15a6282ec6..9bbbff6554 100644 --- a/services/web/app/coffee/infrastructure/Server.coffee +++ b/services/web/app/coffee/infrastructure/Server.coffee @@ -63,8 +63,11 @@ Modules.loadViewIncludes app app.use bodyParser.urlencoded({ extended: true, limit: "2mb"}) -# Make sure we can process the max doc length plus some overhead for JSON encoding -app.use bodyParser.json({limit: Settings.max_doc_length + 64 * 1024}) # 64kb overhead +# Make sure we can process twice the max doc length, to allow for +# - the doc content +# - text ranges spanning the whole doc +# Also allow some overhead for JSON encoding +app.use bodyParser.json({limit: 2 * Settings.max_doc_length + 64 * 1024}) # 64kb overhead app.use methodOverride() app.use bearerToken()