Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Adding favicon to Kedro Demo #1509

Merged
merged 21 commits into from
Aug 31, 2023
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion package/kedro_viz/api/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import secure
from fastapi import FastAPI, HTTPException
from fastapi.requests import Request
from fastapi.responses import HTMLResponse, JSONResponse, Response
from fastapi.responses import FileResponse, HTMLResponse, JSONResponse, Response
from fastapi.staticfiles import StaticFiles
from jinja2 import Environment, FileSystemLoader

Expand Down Expand Up @@ -72,6 +72,11 @@ def create_api_app_from_project(
# this is used as an etag embedded in the frontend for client to use when making requests.
app_etag = _create_etag()

# Serve the favicon.ico file from the "html" directory
@app.get('/favicon.ico', include_in_schema=False)
async def favicon():
return FileResponse(_HTML_DIR / "favicon.ico")

@app.get("/")
@app.get("/experiment-tracking")
async def index():
Expand Down