Skip to content

Commit 4d177ab

Browse files
committed
Increase MAX_FORM_MEMORY_SIZE after Flask upgrade
After 150dae4 we bumped Flask to 3.1 which started adding a limit to the maximum size a form field can be to 500KB by default. On cc-perf.igalia.com the runs that are submitted are around 5MB, so submissions started failing with a 413 RequestEntityTooLarge error. This increases it to 10MB to fix the error.
1 parent 9ba2afe commit 4d177ab

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lnt/server/ui/app.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,10 @@ def __init__(self, name):
224224
self.wsgi_app = RootSlashPatchMiddleware(self.wsgi_app)
225225
self.logger.setLevel(logging.DEBUG)
226226

227+
# Submitted runs can be pretty large so increase the maximum allowed
228+
# form field size to 10MB to prevent 413 errors.
229+
self.config['MAX_FORM_MEMORY_SIZE'] = 10_000_000
230+
227231
def load_config(self, instance):
228232
self.instance = instance
229233
self.old_config = self.instance.config

0 commit comments

Comments
 (0)