Make session permanent (90 days, actually)

This commit is contained in:
Peter J. Holzer 2022-11-13 21:39:37 +01:00
parent b6db3f0ea9
commit a163976b1d
1 changed files with 2 additions and 0 deletions

2
app.py
View File

@ -73,6 +73,8 @@ def confirm():
if not bod:
return render_template("wrong_key.html")
session["user"] = { "id": bod.id, "email": bod.email}
session.permanent = True
app.permanent_session_lifetime = datetime.timedelta(days=90)
return redirect(request.args["target"])
@app.route("/vote/<string:key>")