fix: serve manifest.webmanifest and other root files in SPA catch-all

This commit is contained in:
Hitonabi
2026-06-25 22:30:26 +02:00
parent d15744a812
commit cb02ede5fb
+6
View File
@@ -51,7 +51,13 @@ if FRONTEND_DIST.exists():
@app.get("/{full_path:path}")
def spa(full_path: str):
# Falls die Datei direkt in FRONTEND_DIST liegt (z.B. manifest.webmanifest, favicon.ico), liefere sie aus
target = FRONTEND_DIST / full_path
if target.is_file():
return FileResponse(target)
index = FRONTEND_DIST / "index.html"
if index.exists():
return FileResponse(index)
return {"detail": "frontend not built"}