Update _config.py

Dynamic SECRET_KEY for docker support.
This commit is contained in:
Takeus committed 2025-04-01 11:53:00 +02:00
1 parent 88c26c931c
commit 6bae5cec91
1 file changed
+5 -2
+5 -2
View File
@@ -1,6 +1,8 @@
##########################################################
############# CONFIGURATION FILE | Flask IPAM ############
import random, string
## Flask Server (For DEV)
app_ip = '127.0.0.1'
app_port = 80
@@ -13,8 +15,9 @@ app_release_date = '02/2025'
app_url = "http://127.0.0.1"
class Configuration:
# openssl rand -hex 32
SECRET_KEY = 'change_me'
# replace SECRET_KEY with value from "openssl rand -hex 32" or similar for STATIC sessions
# With actual configuration, every application restart, user have to re-login...
SECRET_KEY = ''.join(random.SystemRandom().choice(string.ascii_uppercase + string.digits) for _ in range(32))
# DB CONFIG
SQLALCHEMY_DATABASE_URI = 'sqlite:///database.db'
SQLALCHEMY_TRACK_MODIFICATIONS = False