Put secret key in env settings, fix security issue

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello 2024-01-13 19:58:15 +01:00
parent cf561c4584
commit 202f979403
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
2 changed files with 1 additions and 3 deletions

View File

@ -29,7 +29,7 @@ ADMINS = [("Emmy D'Anello", "emmy.danello@animath.fr")]
# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '6$wl1=ehfoiymin3m3i-wyx5d3t=1h7g4(j2izn*my)*yiq#he'
SECRET_KEY = os.getenv('DJANGO_SECRET_KEY', 'CHANGE_ME_IN_ENV_SETTINGS')
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

View File

@ -9,8 +9,6 @@ DEBUG = False
# Mandatory !
ALLOWED_HOSTS = ['inscription.tfjm.org', 'plateforme.tfjm.org']
SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY', 'CHANGE_ME_IN_ENV_SETTINGS')
# Emails
EMAIL_BACKEND = 'mailer.backend.DbBackend'
MAILER_EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'