fix(api): accept HEAD on SPA routes (uptime checks)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
1 changed file +1 −1
modified
backend/app/main.py
+1 −1
@@ -96,7 +96,7 @@ dist: Path = settings.FRONTEND_DIST | ||
| 96 | 96 | if dist.exists(): |
| 97 | 97 | app.mount("/assets", StaticFiles(directory=dist / "assets"), name="assets") |
| 98 | 98 | |
| 99 | − @app.get("/{full_path:path}", include_in_schema=False) | |
| 99 | + @app.api_route("/{full_path:path}", methods=["GET", "HEAD"], include_in_schema=False) | |
| 100 | 100 | async def spa(full_path: str): # noqa: ANN201 |
| 101 | 101 | candidate = dist / full_path |
| 102 | 102 | if full_path and candidate.is_file(): |
| 103 | 103 | |