sdf
This commit is contained in:
parent
a7a555cabd
commit
25d9dd0279
1 changed files with 2 additions and 0 deletions
|
@ -84,6 +84,8 @@ db_session = scoped_session(sessionmaker(bind=engine, autoflush=False))
|
|||
|
||||
@app.before_request
|
||||
def before_request():
|
||||
|
||||
if request.content_length > 16 * 1024 * 1024: abort(413)
|
||||
|
||||
if request.method.lower() != "get" and app.config["READ_ONLY"]: return {"error":f"{app.config['SITE_NAME']} is currently in read-only mode."}, 500
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue