make sure session cookie is secure and has an expiration date

This commit is contained in:
Lera Elvoé 2025-06-30 16:53:20 +03:00
parent 05cbc03e82
commit ea5ecc3a9f
Signed by: yagich
SSH Key Fingerprint: SHA256:6xjGb6uA7lAVcULa7byPEN//rQ0wPoG+UzYVMfZnbvc

View File

@ -74,6 +74,11 @@ def create_app():
app.register_blueprint(topics_bp) app.register_blueprint(topics_bp)
app.register_blueprint(users_bp) app.register_blueprint(users_bp)
app.config['SESSION_COOKIE_SECURE'] = True
@app.before_request
def make_session_permanent():
session.permanent = True
@app.context_processor @app.context_processor
def inject_constants(): def inject_constants():