diff --git a/cortex/main.py b/cortex/main.py index 09fbfc7..f28718f 100644 --- a/cortex/main.py +++ b/cortex/main.py @@ -35,14 +35,16 @@ app.include_router(distill.router) app.include_router(auth.router) app.include_router(orchestrator.router) +# Static files — must be mounted BEFORE ui.router so /static/* is matched first. +# ui.router has a wildcard /{username}/{persona} that would otherwise catch /static/style.css etc. +app.mount("/static", StaticFiles(directory="static"), name="static") + # Onboarding (invite tokens + persona creation — before ui.router) app.include_router(onboarding.router) # UI router (login + /{user}/{persona} — must be last to avoid swallowing API paths) app.include_router(ui.router) -app.mount("/static", StaticFiles(directory="static"), name="static") - @app.get("/health") async def health() -> dict: