mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-04-24 06:37:16 -04:00
Fixed mass editor returning a 413 error with a large series/movies set.
This commit is contained in:
parent
a8c352854f
commit
e4bc792ee0
1 changed files with 9 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue