koboldcpp/tools/server/webui/src/lib/services
SATISH K C fcc2d598c8
fix: include API key in CORS proxy requests for MCP connections (#21193)
* fix: include API key in CORS proxy requests for MCP connections

When llama-server is started with --api-key-file and --webui-mcp-proxy,
the /cors-proxy endpoint requires authentication. The WebUI was not
including the Authorization header in proxy requests, causing MCP
connections to fail with 401.

Inject getAuthHeaders() into requestInit when useProxy is true so the
proxy request carries the Bearer token alongside the forwarded target
headers.

Fixes #21167

* fix: simplify headers assignment based on reviewer suggestion

Apply buildProxiedHeaders only when useProxy is true, pass headers
directly to the transport otherwise.
2026-03-31 10:52:34 +02:00
..
chat.service.ts server/webui: cleanup dual representation approach, simplify to openai-compat (#21090) 2026-03-31 10:42:06 +02:00
database.service.ts webui: Conversation forking + branching improvements (#21021) 2026-03-28 13:38:15 +01:00
index.ts webui: Agentic Loop + MCP Client with support for Tools, Resources and Prompts (#18655) 2026-03-06 10:00:39 +01:00
mcp.service.ts fix: include API key in CORS proxy requests for MCP connections (#21193) 2026-03-31 10:52:34 +02:00
models.service.ts webui: Improve model parsing logic + add unit tests (#20749) 2026-03-19 12:25:50 +01:00
parameter-sync.service.spec.ts common/parser: add proper reasoning tag prefill reading (#20424) 2026-03-19 16:58:21 +01:00
parameter-sync.service.ts Send reasoning content back to the model across turns via the reasoning_content API field (#21036) 2026-03-27 08:17:35 +01:00
props.service.ts webui: Architecture and UI improvements (#19596) 2026-02-14 09:06:41 +01:00