remotes/1693045480750635534/spooky-22
Aevann1 2021-09-21 23:45:47 +02:00
parent 470118696f
commit 53e5ee2715
1 changed files with 2 additions and 0 deletions

View File

@ -85,6 +85,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
if app.config["BOT_DISABLE"] and request.headers.get("X-User-Type")=="Bot": abort(503)