Skip to content

Commit aa80e29

Browse files
committed
added default values for secret_key and security_hash
1 parent 5536dc6 commit aa80e29

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

configs.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,11 @@ def get_sys_exec_root_or_drive():
3838
print("Application requires 'ALGOLIA_APP_ID' and 'ALGOLIA_API_KEY' for search")
3939

4040

41-
secret_key = os.environ.get('SECRET_KEY')
41+
secret_key = os.environ.get('SECRET_KEY', 'change_secret_key')
4242

4343
security_password_hash = 'pbkdf2_sha512'
4444
# Replace this with your own salt.
45-
security_password_salt = os.environ.get('SECURITY_PASSWORD_SALT')
46-
if not all([secret_key, security_password_salt]):
47-
raise KeyError("Keys'SECRET_KEY' and 'SECURITY_PASSWORD_SALT' missing")
45+
security_password_salt = os.environ.get('SECURITY_PASSWORD_SALT', '!@#$!!@$%@')
4846

4947

5048
index_name = os.environ.get("INDEX_NAME")

0 commit comments

Comments
 (0)