Skip to content

Commit

Permalink
fix: use random secret key instead of hardcoding it
Browse files Browse the repository at this point in the history
  • Loading branch information
b1rger committed Dec 20, 2023
1 parent caa5278 commit cfddf72
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions apis_acdhch_default_settings/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import re
from typing import Any, Dict

from django.core.management.utils import get_random_secret_key
import dj_database_url

if os.environ.get("SENTRY_DSN"):
Expand All @@ -22,10 +23,7 @@
send_default_pii=True,
)

# We fall back to a DEFAULT_SECRET_KEY, but you should
# override this using an environment variable!
DEFAULT_SECRET_KEY = "a+nkut46lzzg_=ul)zrs29$u_6^*)2by2mjmwn)tqlgw)_at&l"
SECRET_KEY = os.environ.get("SECRET_KEY", DEFAULT_SECRET_KEY)
SECRET_KEY = os.environ.get("SECRET_KEY", get_random_secret_key())

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(
Expand Down

0 comments on commit cfddf72

Please sign in to comment.