Serve favicon from static public assets
Some checks failed
docker / build-and-push (push) Has been cancelled
Some checks failed
docker / build-and-push (push) Has been cancelled
This commit is contained in:
@@ -16,6 +16,7 @@ from fastapi.staticfiles import StaticFiles
|
||||
from pydantic import BaseModel
|
||||
|
||||
STATIC_DIR = Path("frontend/dist")
|
||||
PUBLIC_DIR = Path("public")
|
||||
SESSION_COOKIE = "jellomator_session"
|
||||
DB_HOST = os.getenv("DB_HOST", "mariadb")
|
||||
DB_PORT = int(os.getenv("DB_PORT", "3306"))
|
||||
@@ -295,6 +296,8 @@ def update_link(
|
||||
|
||||
if STATIC_DIR.exists():
|
||||
app.mount("/assets", StaticFiles(directory=STATIC_DIR / "assets"), name="assets")
|
||||
if PUBLIC_DIR.exists():
|
||||
app.mount("/static", StaticFiles(directory=PUBLIC_DIR), name="public")
|
||||
|
||||
|
||||
@app.get("/{path:path}")
|
||||
|
||||
Reference in New Issue
Block a user