mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-13 06:34:25 -04:00
remove symbols from random secret key for easier copy pastin
This commit is contained in:
parent
4faef03ba3
commit
0c9db1c554
2 changed files with 2 additions and 2 deletions
|
@ -480,7 +480,7 @@ def write_config_file(config: Dict[str, str], out_dir: str=None) -> ConfigDict:
|
||||||
|
|
||||||
if (not existing_secret_key) or ('not a valid secret' in existing_secret_key):
|
if (not existing_secret_key) or ('not a valid secret' in existing_secret_key):
|
||||||
from django.utils.crypto import get_random_string
|
from django.utils.crypto import get_random_string
|
||||||
chars = 'abcdefghijklmnopqrstuvwxyz0123456789-_+!.'
|
chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'
|
||||||
random_secret_key = get_random_string(50, chars)
|
random_secret_key = get_random_string(50, chars)
|
||||||
if 'SERVER_CONFIG' in config_file:
|
if 'SERVER_CONFIG' in config_file:
|
||||||
config_file['SERVER_CONFIG']['SECRET_KEY'] = random_secret_key
|
config_file['SERVER_CONFIG']['SECRET_KEY'] = random_secret_key
|
||||||
|
|
|
@ -117,7 +117,7 @@ EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
||||||
### Security Settings
|
### Security Settings
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
SECRET_KEY = SECRET_KEY or get_random_string(50, 'abcdefghijklmnopqrstuvwxyz0123456789-_+!.')
|
SECRET_KEY = SECRET_KEY or get_random_string(50, 'abcdefghijklmnopqrstuvwxyz0123456789_')
|
||||||
|
|
||||||
ALLOWED_HOSTS = ALLOWED_HOSTS.split(',')
|
ALLOWED_HOSTS = ALLOWED_HOSTS.split(',')
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue