Skip to content

Commit

Permalink
🐛 Check if SECRET_KEY is empty (#3266)
Browse files Browse the repository at this point in the history
  • Loading branch information
greenfrogs committed Mar 30, 2021
1 parent 8049038 commit 4b6c036
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions backend/uclapi/uclapi/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = os.environ.get("SECRET_KEY", get_random_secret_key())
if SECRET_KEY == "" or SECRET_KEY is None:
SECRET_KEY = get_random_secret_key()

CACHET_TOKEN = os.environ.get("CACHET_TOKEN")
CACHET_URL = os.environ.get("CACHET_URL")
# SECURITY WARNING: don't run with debug turned on in production!
Expand Down

0 comments on commit 4b6c036

Please sign in to comment.