Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions backend/bitmatch/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,17 @@
# See https://docs.djangoproject.com/en/5.1/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-insecure-b4wn$=0zp6j)8%uejmc)hp&3$j3myn$(&i_69(c@shw1i285*v'
SECRET_KEY = os.getenv("DJANGO_SECRET_KEY")

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
DJANGO_ENV = os.getenv("DJANGO_ENV", "DEV").upper()

ALLOWED_HOSTS = ["*"]
DEBUG = DJANGO_ENV == "DEV"

if DJANGO_ENV == "PROD":
ALLOWED_HOSTS = ["bitmatchapp.com", "www.bitmatchapp.com"]
else:
ALLOWED_HOSTS = ["localhost", "127.0.0.1"]

REST_FRAMEWORK = {
"DEFAULT_AUTHENTICATION_CLASSES": (
Expand Down Expand Up @@ -178,6 +183,7 @@
"http://localhost:5173",
"http://localhost:5174",
"https://bitmatchapp.com",
"https://www.bitmatchapp.com",
"https://api.bitmatchapp.com",
]

Expand Down
Loading