Skip to content

Commit

Permalink
Add SECRET_KEY to env, remove session_lifetime
Browse files Browse the repository at this point in the history
  • Loading branch information
sondregronas committed Apr 16, 2024
1 parent 2c39c4f commit e231b22
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions BookingSystem/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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

Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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://<fqdn>/login/feide/callback'
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down

0 comments on commit e231b22

Please sign in to comment.