WebHost: add a page to manage session cookie (#4173)

This commit is contained in:
Fabian Dill
2024-11-30 04:11:28 +01:00
committed by GitHub
parent c1b27f79ac
commit 9eaca95277
5 changed files with 63 additions and 8 deletions

View File

@@ -18,13 +18,6 @@ def get_world_theme(game_name: str):
return 'grass'
@app.before_request
def register_session():
session.permanent = True # technically 31 days after the last visit
if not session.get("_id", None):
session["_id"] = uuid4() # uniquely identify each session without needing a login
@app.errorhandler(404)
@app.errorhandler(jinja2.exceptions.TemplateNotFound)
def page_not_found(err):