Skip to content

Commit

Permalink
Restructure the config file
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sathiyaraj-sridhar committed Nov 30, 2023
1 parent 252c7a9 commit 9d52e80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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()
Expand Down

0 comments on commit 9d52e80

Please sign in to comment.