taahaasaif commited on
Commit
374cac2
·
verified ·
1 Parent(s): a2c567f

Update src/main.py

Browse files
Files changed (1) hide show
  1. src/main.py +2 -2
src/main.py CHANGED
@@ -12,11 +12,11 @@ def create_app():
12
  )
13
  # Get allowed origins from environment variable or use defaults
14
  # Support multiple origins separated by commas
15
- allowed_origins_str = os.getenv("ALLOWED_ORIGINS", "https://full-stack-the-evolution-of-todo.vercel.app")
16
  allowed_origins = [origin.strip() for origin in allowed_origins_str.split(",")]
17
 
18
  # Also add common Vercel patterns if not already included
19
- vercel_url = os.getenv("VERCEL_URL")
20
  if vercel_url and vercel_url not in allowed_origins:
21
  # Add both http and https versions
22
  if not vercel_url.startswith("http"):
 
12
  )
13
  # Get allowed origins from environment variable or use defaults
14
  # Support multiple origins separated by commas
15
+ allowed_origins_str = os.getenv("ALLOWED_ORIGINS", "https://full-stack-the-evolution-of-todo.vercel.app", "http://localhost:3000")
16
  allowed_origins = [origin.strip() for origin in allowed_origins_str.split(",")]
17
 
18
  # Also add common Vercel patterns if not already included
19
+ vercel_url = "https://full-stack-the-evolution-of-todo.vercel.app"
20
  if vercel_url and vercel_url not in allowed_origins:
21
  # Add both http and https versions
22
  if not vercel_url.startswith("http"):