cxxc
This commit is contained in:
parent
97b95c9637
commit
3210b1773f
4 changed files with 5 additions and 6 deletions
|
@ -85,10 +85,6 @@ mail = Mail(app)
|
|||
|
||||
@app.before_request
|
||||
def before_request():
|
||||
if not session.get("session_id") and not request.path.startswith("/assets") and not request.path.startswith("/images") and not request.path.startswith("/hostedimages") and not request.path.startswith("/static") and not request.path.startswith("/song"):
|
||||
session.permanent = True
|
||||
session["session_id"] = secrets.token_hex(49)
|
||||
|
||||
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