Skip to content

Commit

Permalink
issue #57: Add default value for MAX_CONTENT_LENGTH
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxence Guindon committed Apr 5, 2024
1 parent bdc2d54 commit f26d829
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@

app = Quart(__name__)
app = cors(app, allow_origin="*", allow_methods=["GET", "POST", "OPTIONS"])
mb = int(os.getenv("NACHET_MAX_CONTENT_LENGTH"))

try:
mb = int(os.getenv("NACHET_MAX_CONTENT_LENGTH"))
except TypeError:
mb = 16

app.config["MAX_CONTENT_LENGTH"] = mb * 1024 * 1024

Expand Down

0 comments on commit f26d829

Please sign in to comment.