diff --git a/backend/right_tree/settings.py b/backend/right_tree/settings.py index e5cecaf..a567492 100644 --- a/backend/right_tree/settings.py +++ b/backend/right_tree/settings.py @@ -10,6 +10,7 @@ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.2/ref/settings/ """ +import os from pathlib import Path # Build paths inside the project like this: BASE_DIR / 'subdir'. @@ -136,7 +137,7 @@ STATIC_URL = '/static/' DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' CORS_ALLOWED_ORIGINS = [ - 'http://localhost:3000' # Update this for production + os.getenv("FRONTEND_BASE_URL") or 'http://localhost:3000' ] CORS_ALLOW_HEADERS = [