Skip to content

Higress + Nacos MCP Registry 转发请求时使用后端服务的域名作为 Host #2177

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
CH3CHO opened this issue May 7, 2025 · 2 comments
Open
1 task done
Labels

Comments

@CH3CHO
Copy link
Collaborator

CH3CHO commented May 7, 2025

If you are reporting any crash or any potential security issue, do not
open an issue in this repo. Please report the issue via ASRC(Alibaba Security Response Center) where the issue will be triaged appropriately.

  • I have searched the issues of this repository and believe that this is not a duplicate.

Ⅰ. Issue Description

如果在 Nacos MCP Registry 中注册了一个使用域名的 MCP Server,Higress 在转发请求的时候仍旧保持了客户端请求时使用的 Host,在后端服务对 Host 有校验或者配置了路由规则的情况下,请求可能无法正常被处理。

Ⅱ. Describe what you expected to happen

当后端服务使用域名作为地址时,建议使用该域名作为转发请求时的 Host 头,原始 Host 可以使用其他 Header 字段进行传递。

Ⅲ. Anything else we need to know?

Envoy auto_host_rewrite: https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#envoy-v3-api-field-config-route-v3-routeaction-auto-host-rewrite

Image

Ⅳ. Environment:

  • Higress version: 2.1.2
    • higress-registry.cn-hangzhou.cr.aliyuncs.com/higress/higress 镜像使用 latest tag(目的是修复 Nacos 3.x 的认证问题)
    • 其余镜像均使用 2.1.2 tag。
  • Nacos version: 3.0.0
  • OS: Windows 10
  • Others: K8s 1.32.3+k3s1(Rancher Desktop)
@CH3CHO
Copy link
Collaborator Author

CH3CHO commented May 7, 2025

CC @johnlanni

@johnlanni johnlanni added the help wanted Extra attention is needed label May 7, 2025
@github-project-automation github-project-automation bot moved this to Todo in Higress May 7, 2025
@johnlanni
Copy link
Collaborator

需要修改istio的实现:https://github.com/higress-group/istio

欢迎认领

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

2 participants