haiku.rag/haiku_rag_slim/haiku/rag/ingester/api/routes
Tres Seaver b78f0ae9ed
feat(ingester): serve control plane under a configurable base path
Add `ingester.api.root_path` so the HTTP control plane (dashboard + API)
can be reverse-proxied behind a sub-path (e.g. /ingester/) on a shared
origin, instead of needing nginx sub_filter URL-rewriting.

- APIConfig.root_path: normalized ('', or single leading slash, no trailing
  slash) via a field_validator; validate_assignment so CLI overrides
  normalize the same way as config-file values.
- Forwarded to FastAPI(root_path=) and uvicorn.Config(root_path=) so
  OpenAPI/docs links are prefix-aware.
- Dashboard route injects a <base href> matching root_path; all dashboard
  fetches are now base-relative, so they resolve under the prefix while
  staying identical at the root.
- `serve --root-path` CLI flag.
- Docs: "Behind a reverse proxy" section with an nginx example.

Closes #431

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 23:02:43 -04:00
..
__init__.py HTTP control plane 2026-05-26 11:41:54 +03:00
config.py Add /database and /config endpoints to the ingester API 2026-06-09 12:11:33 +03:00
dashboard.py feat(ingester): serve control plane under a configurable base path 2026-06-09 23:02:43 -04:00
database.py Add /database and /config endpoints to the ingester API 2026-06-09 12:11:33 +03:00
dlq.py Bound ?limit and ?offset on /jobs and /dlq 2026-05-26 16:05:47 +03:00
health.py Add pool-wide circuit breaker to the worker pool 2026-05-27 10:52:48 +03:00
jobs.py Bound ?limit and ?offset on /jobs and /dlq 2026-05-26 16:05:47 +03:00
providers.py Probe docling-serve only when converter or chunker uses it 2026-05-27 15:18:25 +03:00
sources.py Tighten retry/reap_stale guards; fix SourceSummary.type leak 2026-05-26 12:38:55 +03:00
stats.py Operator dashboard at GET /; tighten Logfire span shape 2026-05-26 11:44:47 +03:00