From 9d52e806bc07f5c4abdf8c96cdb450db77dd62d9 Mon Sep 17 00:00:00 2001 From: Sathiyaraj Sridhar Date: Thu, 30 Nov 2023 18:01:44 +0530 Subject: [PATCH] Restructure the config file The snippet that bypasses the static endpoint was mistakenly added in the Redis configuration block. This commit rectifies the issue by moving the snippet to the app configuration block. --- config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.py b/config.py index 0305753..d1d185b 100644 --- a/config.py +++ b/config.py @@ -8,6 +8,8 @@ def app_conf(): conf = file.read() conf = json.loads(conf) file.close() + if 'STATIC_ENDPOINT' in os.environ: + conf['cdn']['static']['endpoint'] = os.environ['STATIC_ENDPOINT'] return conf # Get Redis configuration. @@ -16,8 +18,6 @@ def redis_conf(): conf = file.read() conf = json.loads(conf) file.close() - if 'STATIC_ENDPOINT' in os.environ: - conf['cdn']['static']['endpoint'] = os.environ['STATIC_ENDPOINT'] return conf app_conf = app_conf()