Skip to content

Commit

Permalink
use random secret key by default in prod
Browse files Browse the repository at this point in the history
  • Loading branch information
sissbruecker committed Jan 28, 2024
1 parent c0b3535 commit e8e50d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion siteroot/settings/prod.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# noinspection PyUnresolvedReferences
import os

from django.core.management.utils import get_random_secret_key
from .base import *

# Turn of debug mode
Expand All @@ -18,7 +19,7 @@
with open(os.path.join(BASE_DIR, "data", "secretkey.txt")) as f:
SECRET_KEY = f.read().strip()
except:
pass
SECRET_KEY = get_random_secret_key()

# Set ALLOWED_HOSTS
# By default look in the HOST_NAME environment variable, if that is not set then allow all hosts
Expand Down

0 comments on commit e8e50d3

Please sign in to comment.