Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .github/workflows/django-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_STORAGE_BUCKET_NAME: ${{ secrets.AWS_STORAGE_BUCKET_NAME }}
DJANGO_SECRET_KEY: ${{ secrets.DJANGO_SECRET_KEY }}

steps:
- name: Checkout code
Expand Down
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