Serve jellomator icon at root path
All checks were successful
docker / build-and-push (push) Successful in 47s
All checks were successful
docker / build-and-push (push) Successful in 47s
This commit is contained in:
@@ -300,6 +300,14 @@ if PUBLIC_DIR.exists():
|
|||||||
app.mount("/static", StaticFiles(directory=PUBLIC_DIR), name="public")
|
app.mount("/static", StaticFiles(directory=PUBLIC_DIR), name="public")
|
||||||
|
|
||||||
|
|
||||||
|
@app.get("/jellomator.png")
|
||||||
|
def root_icon():
|
||||||
|
icon = PUBLIC_DIR / "jellomator.png"
|
||||||
|
if not icon.exists():
|
||||||
|
raise HTTPException(404, "Not found")
|
||||||
|
return FileResponse(icon)
|
||||||
|
|
||||||
|
|
||||||
@app.get("/{path:path}")
|
@app.get("/{path:path}")
|
||||||
def spa(path: str):
|
def spa(path: str):
|
||||||
if path.startswith("api/"):
|
if path.startswith("api/"):
|
||||||
|
|||||||
Reference in New Issue
Block a user