diff options
-rw-r--r-- | uploader/__init__.py | 3 | ||||
-rw-r--r-- | uploader/default_settings.py | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/uploader/__init__.py b/uploader/__init__.py index feffcae..a3b36e7 100644 --- a/uploader/__init__.py +++ b/uploader/__init__.py @@ -4,6 +4,7 @@ import logging from pathlib import Path from flask import Flask, request +from flask_session import Session from .entry import entrybp from .upload import upload @@ -41,6 +42,8 @@ def create_app(): # setup jinja2 symbols app.add_template_global(lambda : request.url, name="request_url") + Session(app) + # setup blueprints app.register_blueprint(base, url_prefix="/") app.register_blueprint(entrybp, url_prefix="/") diff --git a/uploader/default_settings.py b/uploader/default_settings.py index 7a9da0f..3add7ef 100644 --- a/uploader/default_settings.py +++ b/uploader/default_settings.py @@ -12,3 +12,7 @@ REDIS_URL = "redis://" JOBS_TTL_SECONDS = 1209600 # 14 days GNQC_REDIS_PREFIX="GNQC" SQL_URI = "" + +SESSION_TYPE = "redis" +SESSION_PERMANENT = True +SESSION_USE_SIGNER = True |