Skip to content

Commit 8dd740a

Browse files
authored
Clean up CORS_ALLOWED_ORIGINS configuration
Refactor CORS_ALLOWED_ORIGINS to remove empty strings.
1 parent ab498c0 commit 8dd740a

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

server/balancer_backend/settings.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,11 @@
6767

6868
ROOT_URLCONF = "balancer_backend.urls"
6969

70-
7170
# CORS configuration
7271
CORS_ALLOWED_ORIGINS = os.environ.get("CORS_ALLOWED_ORIGINS", "http://localhost:3000").split(",")
7372
# Ensure no empty strings if input was empty or trailing comma
7473
CORS_ALLOWED_ORIGINS = [origin.strip() for origin in CORS_ALLOWED_ORIGINS if origin.strip()]
7574

76-
7775
TEMPLATES = [
7876
{
7977
"BACKEND": "django.template.backends.django.DjangoTemplates",

0 commit comments

Comments
 (0)