Skip to content

Commit

Permalink
Use timedelta to compute session lifetime
Browse files Browse the repository at this point in the history
  • Loading branch information
markhobson committed Jun 3, 2024
1 parent f60aab2 commit 8f0ade7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion schemes/config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
from datetime import timedelta


class Config:
# Flask
SESSION_COOKIE_SECURE = True
PERMANENT_SESSION_LIFETIME = 60 * 60 # 1 hour
PERMANENT_SESSION_LIFETIME = timedelta(hours=1)

# Flask-SQLAlchemy
SQLALCHEMY_DATABASE_URI = "sqlite+pysqlite:///:memory:"
Expand Down

0 comments on commit 8f0ade7

Please sign in to comment.