Spaces:
Sleeping
Sleeping
NeonClary Cursor commited on
Commit ·
b200cd6
1
Parent(s): 8fc16a2
Serve the React SPA at / instead of the backend JSON banner (move health banner to /api/health)
Browse files
multi_llm_chatbot_backend/app/api/routes/root.py
CHANGED
|
@@ -8,7 +8,11 @@ logger = logging.getLogger(__name__)
|
|
| 8 |
|
| 9 |
router = APIRouter()
|
| 10 |
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
def root():
|
| 13 |
title = get_settings().app.title
|
| 14 |
return {
|
|
|
|
| 8 |
|
| 9 |
router = APIRouter()
|
| 10 |
|
| 11 |
+
# NB: keep this OFF the bare "/" path. In the single-container / Hugging Face
|
| 12 |
+
# Spaces deployment the React SPA is mounted at "/" as a catch-all, and any
|
| 13 |
+
# API route registered at exactly "/" would shadow the SPA's index.html and
|
| 14 |
+
# leave users staring at this JSON banner instead of the app.
|
| 15 |
+
@router.get("/api/health")
|
| 16 |
def root():
|
| 17 |
title = get_settings().app.title
|
| 18 |
return {
|