Upgrade to FastAPI 0.85.0 and check embedded web-ui index.html can be found.

This commit is contained in:
grossmj 2022-09-29 15:11:15 +02:00
parent 9a7222b83e
commit 19de2732f2
2 changed files with 4 additions and 1 deletions

View File

@ -55,6 +55,9 @@ async def web_ui(file_path: str):
if static is None or not os.path.exists(static): if static is None or not os.path.exists(static):
static = get_resource(os.path.join("static", "web-ui", "index.html")) static = get_resource(os.path.join("static", "web-ui", "index.html"))
if static is None:
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND)
# guesstype prefers to have text/html type than application/javascript # guesstype prefers to have text/html type than application/javascript
# which results with warnings in Firefox 66 on Windows # which results with warnings in Firefox 66 on Windows
# Ref. gns3-server#1559 # Ref. gns3-server#1559

View File

@ -1,5 +1,5 @@
uvicorn==0.18.3 uvicorn==0.18.3
fastapi==0.84.0 fastapi==0.85.0
python-multipart==0.0.5 python-multipart==0.0.5
websockets==10.3 websockets==10.3
aiohttp==3.8.1 aiohttp==3.8.1