From ea5ecc3a9fd120a3ed4f493b2607128944c9cfa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lera=20Elvo=C3=A9?= Date: Mon, 30 Jun 2025 16:53:20 +0300 Subject: [PATCH] make sure session cookie is secure and has an expiration date --- app/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/__init__.py b/app/__init__.py index 7ee0ff1..46faa17 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -74,6 +74,11 @@ def create_app(): app.register_blueprint(topics_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 def inject_constants():