Skip to content

Commit

Permalink
add flask config: max content length
Browse files Browse the repository at this point in the history
  • Loading branch information
teihenn committed Dec 26, 2023
1 parent 2c4d536 commit cd38156
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions airflow/www/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ def create_app(config=None, testing=False):

flask_app.config["PERMANENT_SESSION_LIFETIME"] = timedelta(minutes=settings.get_session_lifetime_config())

limit_in_mb = 1
flask_app.config["MAX_CONTENT_LENGTH"] = limit_in_mb * 1024 * 1024

webserver_config = conf.get_mandatory_value("webserver", "config_file")
# Enable customizations in webserver_config.py to be applied via Flask.current_app.
with flask_app.app_context():
Expand Down

0 comments on commit cd38156

Please sign in to comment.