Spaces:
Running
Running
Update origings once more
Browse files- app/main.py +5 -2
app/main.py
CHANGED
@@ -7,9 +7,12 @@ from app.models.schemas import StandardResponse
|
|
7 |
app = FastAPI(title="Cognisafe API")
|
8 |
|
9 |
origins = [
|
10 |
-
"https://cognisafe.netlify.app"
|
|
|
|
|
|
|
|
|
11 |
]
|
12 |
-
|
13 |
app.add_middleware(
|
14 |
CORSMiddleware,
|
15 |
allow_origins=origins, # or ["*"] for all origins (not recommended in prod)
|
|
|
7 |
app = FastAPI(title="Cognisafe API")
|
8 |
|
9 |
origins = [
|
10 |
+
"https://cognisafe.netlify.app", # Your frontend origin
|
11 |
+
"https://zyriean-cognisafe-backend.hf.space", # <-- **THIS IS CRUCIAL**
|
12 |
+
# You might also want to include localhost for local development:
|
13 |
+
"http://localhost",
|
14 |
+
"http://localhost:8000", # Or whatever port you use for local testing
|
15 |
]
|
|
|
16 |
app.add_middleware(
|
17 |
CORSMiddleware,
|
18 |
allow_origins=origins, # or ["*"] for all origins (not recommended in prod)
|