web: fixes for logo
Local Docker Build (Dev) / build-dev (push) Successful in 4s

This commit is contained in:
2025-10-22 14:36:24 -04:00
parent c1829b2aef
commit 9397f115e3
3 changed files with 20 additions and 1 deletions
+18
View File
@@ -64,6 +64,24 @@ def setup_static_files(app: FastAPI) -> None:
return FileResponse(index_file)
else:
return {"message": "NFOGuard Web Interface", "status": "running"}
# Serve favicon
@app.get("/favicon.ico")
async def serve_favicon():
# Try to serve favicon from logo directory or static files
favicon_paths = [
os.path.join(logo_path, "favicon.ico"),
os.path.join(static_path, "favicon.ico"),
os.path.join(logo_path, "NFOguardLogoPlain.png") # Fallback to logo
]
for favicon_path in favicon_paths:
if os.path.exists(favicon_path):
return FileResponse(favicon_path)
# Return 204 No Content if no favicon found
from fastapi import Response
return Response(status_code=204)
def main():