This commit is contained in:
@@ -38,11 +38,20 @@ def setup_static_files(app: FastAPI) -> None:
|
||||
static_path = os.path.join(os.path.dirname(__file__), "nfoguard-web", "static")
|
||||
logo_path = os.path.join(os.path.dirname(__file__), "logo")
|
||||
|
||||
print(f"🔍 Checking static path: {static_path} (exists: {os.path.exists(static_path)})")
|
||||
print(f"🔍 Checking logo path: {logo_path} (exists: {os.path.exists(logo_path)})")
|
||||
|
||||
if os.path.exists(static_path):
|
||||
app.mount("/static", StaticFiles(directory=static_path), name="static")
|
||||
print(f"✅ Mounted static files from: {static_path}")
|
||||
else:
|
||||
print(f"❌ Static path not found: {static_path}")
|
||||
|
||||
if os.path.exists(logo_path):
|
||||
app.mount("/logo", StaticFiles(directory=logo_path), name="logo")
|
||||
print(f"✅ Mounted logo files from: {logo_path}")
|
||||
else:
|
||||
print(f"❌ Logo path not found: {logo_path}")
|
||||
|
||||
# Serve index.html at root
|
||||
@app.get("/")
|
||||
|
||||
Reference in New Issue
Block a user