Skip to content

Commit

Permalink
Fixed mass editor returning a 413 error with a large series/movies set.
Browse files Browse the repository at this point in the history
  • Loading branch information
morpheus65535 committed Apr 17, 2024
1 parent a8c3528 commit e4bc792
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion 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
Expand All @@ -13,9 +13,17 @@
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)
Expand Down

0 comments on commit e4bc792

Please sign in to comment.