Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Python agentaianthropicclaude-codecompressioncontext-engineeringcontext-windowcursorfastapilangchainllmmcpopenaiprompt-engineeringproxypythonragtoken-optimizationtokenstypescript
fix(proxy): disable uvicorn proxy-headers to harden loopback guard
Adryan Eka Vandra61947732969a
diff --git a/headroom/proxy/server.py b/headroom/proxy/server.pyindex ef6507223..ad2021216 100644--- a/headroom/proxy/server.py+++ b/headroom/proxy/server.py@@ -2572,6 +2572,12 @@ def run_server(log_level="warning",workers=workers if workers > 1 else None, # None = single process (default)limit_concurrency=limit_concurrency,+ # Defense-in-depth: the loopback guard for /debug/* endpoints trusts+ # request.client.host. uvicorn's ProxyHeadersMiddleware rewrites that+ # from X-Forwarded-For when FORWARDED_ALLOW_IPS is broader than the+ # default. Disabling proxy_headers here guarantees the guard sees the+ # real peer address regardless of env.+ proxy_headers=False,)