From 7c20cf9cdf3a3391a707c0c096e575bdc1505f4d Mon Sep 17 00:00:00 2001 From: Mondo Diaz Date: Thu, 15 Jan 2026 18:36:17 +0000 Subject: [PATCH] Fix static file serving for favicon and other dist root files --- backend/app/main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/app/main.py b/backend/app/main.py index f733e54..ac71491 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -88,6 +88,11 @@ if os.path.exists(static_dir): raise HTTPException(status_code=404, detail="Not found") + # Check if requesting a static file from dist root (favicon, etc.) + static_file_path = os.path.join(static_dir, full_path) + if os.path.isfile(static_file_path) and not full_path.startswith("."): + return FileResponse(static_file_path) + # Serve SPA for all other routes (including /project/*) index_path = os.path.join(static_dir, "index.html") if os.path.exists(index_path):