Spaces:
Sleeping
Sleeping
vickysrm commited on
Commit ·
6fe7f14
1
Parent(s): d85f045
fix: Open CORS for all origins
Browse files
main.py
CHANGED
|
@@ -46,8 +46,8 @@ origins = os.getenv("ALLOWED_ORIGINS", "*").split(",")
|
|
| 46 |
|
| 47 |
app.add_middleware(
|
| 48 |
CORSMiddleware,
|
| 49 |
-
allow_origins=
|
| 50 |
-
allow_credentials=
|
| 51 |
allow_methods=["*"],
|
| 52 |
allow_headers=["*"],
|
| 53 |
)
|
|
@@ -67,6 +67,15 @@ app.include_router(session.router, prefix="/session", tags=["session"])
|
|
| 67 |
app.include_router(transcript.router, prefix="/transcript", tags=["transcript"])
|
| 68 |
app.include_router(qa.router, prefix="/qa", tags=["qa"])
|
| 69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
@app.get("/health")
|
| 71 |
def health():
|
| 72 |
return {"status": "ok", "service": "FocusFlow API"}
|
|
|
|
| 46 |
|
| 47 |
app.add_middleware(
|
| 48 |
CORSMiddleware,
|
| 49 |
+
allow_origins=["*"],
|
| 50 |
+
allow_credentials=False,
|
| 51 |
allow_methods=["*"],
|
| 52 |
allow_headers=["*"],
|
| 53 |
)
|
|
|
|
| 67 |
app.include_router(transcript.router, prefix="/transcript", tags=["transcript"])
|
| 68 |
app.include_router(qa.router, prefix="/qa", tags=["qa"])
|
| 69 |
|
| 70 |
+
@app.get("/")
|
| 71 |
+
def root():
|
| 72 |
+
return {
|
| 73 |
+
"message": "Welcome to FocusFlow API",
|
| 74 |
+
"status": "online",
|
| 75 |
+
"docs": "/docs",
|
| 76 |
+
"health": "/health"
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
@app.get("/health")
|
| 80 |
def health():
|
| 81 |
return {"status": "ok", "service": "FocusFlow API"}
|