diff options
author | morpheus65535 <[email protected]> | 2024-04-16 20:54:52 -0400 |
---|---|---|
committer | morpheus65535 <[email protected]> | 2024-04-16 20:54:52 -0400 |
commit | e4bc792ee0fba64a3a20d817bbf2c3e2ba66b737 (patch) | |
tree | b7980988bcea5d7676e6fbb55a165d434af2f0db | |
parent | a8c352854fc70717de54823f4ce185990be5b8f7 (diff) | |
download | bazarr-e4bc792ee0fba64a3a20d817bbf2c3e2ba66b737.tar.gz bazarr-e4bc792ee0fba64a3a20d817bbf2c3e2ba66b737.zip |
Fixed mass editor returning a 413 error with a large series/movies set.
-rw-r--r-- | bazarr/app/app.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/bazarr/app/app.py b/bazarr/app/app.py index 982cea34b..918d877e1 100644 --- a/bazarr/app/app.py +++ b/bazarr/app/app.py @@ -1,6 +1,6 @@ # coding=utf-8 -from flask import Flask, redirect +from flask import Flask, redirect, Request from flask_compress import Compress from flask_cors import CORS @@ -13,9 +13,17 @@ from .config import settings, base_url socketio = SocketIO() +class CustomRequest(Request): + def __init__(self, *args, **kwargs): + super(CustomRequest, self).__init__(*args, **kwargs) + # required to increase form-data size before returning a 413 + self.max_form_parts = 10000 + + def create_app(): # Flask Setup app = Flask(__name__) + app.request_class = CustomRequest app.config['COMPRESS_ALGORITHM'] = 'gzip' Compress(app) app.wsgi_app = ReverseProxied(app.wsgi_app) |