fix(api): /home 404

This commit is contained in:
Junyan Qin
2025-05-10 11:25:49 +08:00
parent d4cf6f650d
commit dbdb942156

View File

@@ -76,7 +76,8 @@ class HTTPController:
@self.quart_app.route('/<path:path>')
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: