From 6bae5cec9159778612cf00f0878ca15d5c49e2a5 Mon Sep 17 00:00:00 2001 From: Takeus <68923554+TakeusV1@users.noreply.github.com> Date: Tue, 1 Apr 2025 11:53:00 +0200 Subject: [PATCH 1/2] Update _config.py Dynamic SECRET_KEY for docker support. --- app/_config.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/_config.py b/app/_config.py index 23d5935..3ce0c09 100644 --- a/app/_config.py +++ b/app/_config.py @@ -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 From a19f59e9a20f0dc25df05a3407c20e67db87bab6 Mon Sep 17 00:00:00 2001 From: Takeus <68923554+TakeusV1@users.noreply.github.com> Date: Tue, 1 Apr 2025 11:53:41 +0200 Subject: [PATCH 2/2] Update _config.py --- app/_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/_config.py b/app/_config.py index 3ce0c09..518944a 100644 --- a/app/_config.py +++ b/app/_config.py @@ -10,7 +10,7 @@ app_debug = True app_maintenance = False app_name = 'takeus-ipam' -app_version = 'V1.2' +app_version = 'V1.3' app_release_date = '02/2025' app_url = "http://127.0.0.1"