web: fixes for logo
This commit is contained in:
@@ -93,6 +93,7 @@ class SimpleAuthMiddleware(BaseHTTPMiddleware):
|
||||
"/webhook/",
|
||||
"/health",
|
||||
"/logo/", # Logo files should always be accessible
|
||||
"/favicon.ico", # Favicon should always be accessible
|
||||
"/ping",
|
||||
"/api/v1/health",
|
||||
"/api/v1/metrics",
|
||||
|
||||
@@ -60,7 +60,7 @@ body {
|
||||
.header-logo .logo {
|
||||
height: 60px;
|
||||
width: auto;
|
||||
filter: brightness(0) invert(1); /* Make logo white */
|
||||
/* filter: brightness(0) invert(1); */ /* Make logo white - temporarily disabled for testing */
|
||||
}
|
||||
|
||||
.header-text {
|
||||
|
||||
@@ -65,6 +65,24 @@ def setup_static_files(app: FastAPI) -> None:
|
||||
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():
|
||||
"""Main entry point for NFOGuard Web Interface"""
|
||||
|
||||
Reference in New Issue
Block a user