diff --git a/BookingSystem/app.py b/BookingSystem/app.py index 97d5546..1507797 100644 --- a/BookingSystem/app.py +++ b/BookingSystem/app.py @@ -6,6 +6,7 @@ from dateutil import parser from flask_compress import Compress from flask_minify import Minify +from flask_session import Session from werkzeug.middleware.proxy_fix import ProxyFix import api @@ -17,7 +18,6 @@ import user from __init__ import logger, REGEX_ID, REGEX_ITEM, MIN_DAYS, MAX_DAYS, MIN_LABELS, MAX_LABELS, DEBUG, MOCK_DATA from db import init_db, Settings -from flask_session import Session def create_app() -> flask.Flask: @@ -26,7 +26,6 @@ def create_app() -> flask.Flask: app.secret_key = os.getenv('SECRET_KEY') app.config['SESSION_TYPE'] = 'filesystem' - app.config['PERMANENT_SESSION_LIFETIME'] = 3600 if os.getenv('DEBUG') == 'True': app.debug = True diff --git a/Dockerfile b/Dockerfile index 495c8b0..896b1ae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,7 @@ ENV MIN_DAYS='1' ENV MAX_DAYS='90' ENV MIN_LABELS='0' ENV MAX_LABELS='10' +ENV SECRET_KEY='SuperSecretKeyHere' # FEIDE OAuth2 ENV FEIDE_REDIRECT_URI='https:///login/feide/callback' diff --git a/docker-compose.yml b/docker-compose.yml index 2df7e71..fbdfd6a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,6 +25,7 @@ services: # Global settings - MAX_DAYS=14 # Maximum days equipment can be borrowed - MAX_LABELS=10 # Maximum number of labels that can be printed at a time + - SECRET_KEY=SuperSecretKey # Random string for session security # Teams Webhooks (for sending notifications to teams channel) - comma separated - TEAMS_WEBHOOKS=