Two bugs surfaced deploying behind Cloudflare+Caddy at a public domain:
1. MCP streamable-HTTP DNS-rebinding protection has empty allowed_hosts by
default, so a proxied public Host returns 421 'Invalid Host header'. Added
MCP_ALLOWED_HOSTS (comma-separated; '*' disables) wiring into the FastMCP
transport_security settings; localhost added automatically.
2. The /mcp -> /mcp/ mount redirect downgraded to http:// because uvicorn
ignored X-Forwarded-Proto. Run uvicorn with --proxy-headers
--forwarded-allow-ips='*' so redirects stay https behind the proxy.
Verified locally: valid Host+token initializes (200 SSE), redirect Location is
https, spoofed Host still 421, missing token still 401.
Set MCP_ALLOWED_HOSTS=websearch.neilbantoc.dev on the deployment and redeploy.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- renderer: plain-fetch escalation when the browser render is blocked (4xx)
or fails — some sites 403 automated browsers but serve plain HTTP clients
- orchestrator: blocked (>=400), empty, and thin results now appear in
failed_urls and the degraded trace list instead of passing silently;
blocked/thin results are never cached
- extractor: thin threshold raised to 500 chars (env: MIN_TEXT_CHARS) so
block/challenge interstitials are flagged instead of passing as content
Outcome on TechPowerUp (fingerprints Chromium AND Firefox, JS-challenges
plain clients): still blocked — accepted per PRD §9 — but results are now
flagged thin/degraded so the calling LLM knows to rely on other sources.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The ^1.49.0 range let npm install 1.61.1 inside the v1.49.0 Playwright image,
whose bundled browsers don't match — renders failed with 'Executable doesn't
exist'. Found during docker compose verification.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- pipeline.search_contents: search then render+extract all results in parallel;
per-URL failures degrade to content:null + failed_urls instead of failing
the request
- REST: POST /search/contents (Tavily-like full flow with trace)
- MCP server (streamable HTTP, stateless) mounted at /mcp on the orchestrator;
tools web_search (with optional full content) and fetch_url share the exact
pipeline + caches as REST
Verified: /search/contents end-to-end with parallel scrapes; MCP tool listing
and both tool calls via the official Python MCP client.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- searcher: file-based instance list (mtime-reloaded, hand-editable), failover
across instances, URL normalization + dedup, Redis search cache (300s TTL)
- searxng: pinned settings.yml with JSON format enabled and limiter disabled,
secret from SEARXNG_SECRET env; wired into compose with config volume
- orchestrator: /search proxying the searcher with per-stage trace; searcher
included in aggregated /health
Verified against a mock SearXNG: failover past a dead instance, dedup of
trailing-slash duplicates, non-http URL filtering, cache miss/hit flags.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- renderer: Node/Playwright, single browser + pooled contexts with concurrency
cap and FIFO queue, Redis render cache (graceful no-op without Redis)
- extractor: FastAPI + Trafilatura, HTML -> {title, text, metadata}
- orchestrator: /scrape (render -> extract) with per-stage trace, aggregated
/health, structured JSON logging on all services
- docker-compose for orchestrator/renderer/extractor/redis with healthchecks
Verified locally: end-to-end scrape of example.com and Wikipedia; error paths
for unreachable hosts and bad schemes.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>