parent
343d293001
commit
681f975df5
5 changed files with 84 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
|||
from random import SystemRandom
|
||||
from uuid import uuid4
|
||||
|
||||
def generate_secret_key():
|
||||
cryptogen = SystemRandom()
|
||||
|
@ -52,6 +53,10 @@ def add_enterprise_config_defaults(config_obj, current_secret_key, hostname):
|
|||
if not 'SECRET_KEY' in config_obj:
|
||||
config_obj['SECRET_KEY'] = current_secret_key
|
||||
|
||||
# Default torrent pepper.
|
||||
if not 'BITTORRENT_FILENAME_PEPPER' in config_obj:
|
||||
config_obj['BITTORRENT_FILENAME_PEPPER'] = str(uuid4())
|
||||
|
||||
# Default storage configuration.
|
||||
if not 'DISTRIBUTED_STORAGE_CONFIG' in config_obj:
|
||||
config_obj['DISTRIBUTED_STORAGE_PREFERENCE'] = ['default']
|
||||
|
|
Reference in a new issue