mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-16 15:30:59 +00:00
fix(api): /home 404
This commit is contained in:
@@ -76,7 +76,8 @@ class HTTPController:
|
|||||||
|
|
||||||
@self.quart_app.route('/<path:path>')
|
@self.quart_app.route('/<path:path>')
|
||||||
async def static_file(path: str):
|
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')):
|
if os.path.exists(os.path.join(frontend_path, path + '.html')):
|
||||||
path += '.html'
|
path += '.html'
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user