agentic-community / agentic-community/mcp-gateway-registry

Server-specific headers not injected into nginx proxy config

未关闭
#285 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
912
派生
234
平均合并
1 天 11 小时
30 天内合并 PR
62

描述

## Bug Description
When registering an MCP server with custom `headers` (e.g., Authorization bearer tokens for backends like Home Assistant), these headers are:
- ✅ Used correctly for health checks (`health/service.py`)
- ✅ Used correctly for internal MCP client calls (`core/mcp_client.py`)
- ❌ NOT injected into the nginx proxy configuration (`core/nginx_service.py`)

This means the gateway always passes the client's JWT to backends instead of the configured server-specific token.

## Steps to Reproduce
1. Register a server with: `"headers": [{"Authorization": "Bearer my-backend-token"}]`
2. Make a request through the gateway
3. Observe the backend receives the client's Keycloak JWT, not `my-backend-token`

## Expected Behavior
The nginx location block should use the server-configured Authorization header.

## Proposed Fix
Modify `_create_location_block()` in `nginx_service.py` to accept and inject server-specific headers.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。