Skip to content

Commit

Permalink
Update ALLOWED_HOSTS and CORS_ALLOWED_ORIGINS in settings.py
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickmac3 committed May 2, 2024
1 parent a0fe679 commit cbfb266
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions backend/core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
SECRET_KEY = env("SECRET_KEY")

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
DEBUG = env("DEBUG")

ALLOWED_HOSTS = []
ALLOWED_HOSTS = ALLOWED_HOSTS = os.environ.get('ALLOWED_HOSTS').split(" ")


# Application definition
Expand Down Expand Up @@ -154,9 +154,8 @@
),
}

CORS_ALLOWED_ORIGINS = [
"http://localhost:3000",
]
CORS_ALLOWED_ORIGINS = os.environ.get('CORS_ALLOWED_ORIGINS', '').split()
CORS_ALLOWED_ORIGINS = [origin for origin in CORS_ALLOWED_ORIGINS if origin]

AUTH_USER_MODEL = "user_profile.User"

Expand Down

0 comments on commit cbfb266

Please sign in to comment.