From dbdb942156436bf0d8870d97ad585cb810f1e493 Mon Sep 17 00:00:00 2001 From: Junyan Qin Date: Sat, 10 May 2025 11:25:49 +0800 Subject: [PATCH] fix(api): /home 404 --- pkg/api/http/controller/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/api/http/controller/main.py b/pkg/api/http/controller/main.py index e5e42df6..e3aab6f4 100644 --- a/pkg/api/http/controller/main.py +++ b/pkg/api/http/controller/main.py @@ -76,7 +76,8 @@ class HTTPController: @self.quart_app.route('/') async def static_file(path: str): - if not os.path.exists(os.path.join(frontend_path, path)): + print(f'path: {path}') + if not (os.path.exists(os.path.join(frontend_path, path)) and os.path.isfile(os.path.join(frontend_path, path))): if os.path.exists(os.path.join(frontend_path, path + '.html')): path += '.html' else: