nikeshn commited on
Commit
5c3f33a
·
verified ·
1 Parent(s): ee3a0ed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -92,8 +92,9 @@ def create_app() -> FastAPI:
92
  "http://127.0.0.1:5173",
93
  "http://localhost:8080",
94
  ]
95
- if settings.extra_cors_origins:
96
- origins.extend(settings.extra_cors_origins)
 
97
 
98
  app.add_middleware(
99
  CORSMiddleware,
 
92
  "http://127.0.0.1:5173",
93
  "http://localhost:8080",
94
  ]
95
+ extra = getattr(settings, "extra_cors_origins", None)
96
+ if extra:
97
+ origins.extend(extra)
98
 
99
  app.add_middleware(
100
  CORSMiddleware,