mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-03-01 23:01:00 -05:00
However, by default, session cookies don't expire (only cleared out by the end user's browser). This is dumb. You'd think, given that there's `config['PERMANENT_SESSION_LIFETIME']`, that you'd enable permanent sessions in the config too - but no, you have to declare it for each request. session.permanent is also, helpfully, a way of saying that the session isn't permanent - in that, it will expire on its own, as opposed to being controlled by the browser's session. Because session is a proxy, it's only accessible from within a request context, so we need to set this before every request 🙄 http://flask.pocoo.org/docs/0.12/api/#flask.session https://stackoverflow.com/questions/34118093/flask-permanent-session-where-to-define-them