Fix handling of secret key: We now generate it on app startup if it doesn't exist in the config (which it doesn't anymore in the base config.py).
This commit is contained in:
parent
1bf25f25c1
commit
40d2b1748f
6 changed files with 11 additions and 5 deletions
|
@ -36,7 +36,7 @@ def set_config_value(config_file, config_key, value):
|
|||
export_yaml(config_obj, config_file)
|
||||
|
||||
|
||||
def add_enterprise_config_defaults(config_obj):
|
||||
def add_enterprise_config_defaults(config_obj, current_secret_key):
|
||||
""" Adds/Sets the config defaults for enterprise registry config. """
|
||||
# These have to be false.
|
||||
config_obj['TESTING'] = False
|
||||
|
@ -52,7 +52,7 @@ def add_enterprise_config_defaults(config_obj):
|
|||
|
||||
# Default secret key.
|
||||
if not 'SECRET_KEY' in config_obj:
|
||||
config_obj['SECRET_KEY'] = generate_secret_key()
|
||||
config_obj['SECRET_KEY'] = current_secret_key
|
||||
|
||||
# Default storage configuration.
|
||||
if not 'DISTRIBUTED_STORAGE_CONFIG' in config_obj:
|
||||
|
|
Reference in a new issue