# API7 Gateway 3.5.0 更新日志

**发布日期：** 2025-01-27

## 新功能[​](#350-features "新功能的直接链接")

### 数据面[​](#350-features-data-plane "数据面的直接链接")

* **一个服务中的多个上游**：对于金丝雀部署、蓝绿部署或管理多个集群等高级场景，一个服务现可使用多个上游。在这种情况下，默认上游是大多数请求的主要目标，其他上游可用于将流量路由到金丝雀部署或备用集群等特定用途。详情请参阅更新后的[配置灰度流量切分](https://docs.apiseven.com/enterprise/getting-started/canary-upstream)。

信息

旧的 **Canary Rule** 功能不再可用。

* 支持通过 [Prometheus](https://docs.apiseven.com/hub/prometheus.md) 插件元数据自定义数据面指标标签配置。
* 优化数据面 Prometheus 指标上报性能。
* \[Beta] 为上游配置 mTLS。目前已提供 API 支持，完整支持即将推出。

### 插件[​](#350-features-plugins "插件的直接链接")

* **[OpenID Connect](https://docs.apiseven.com/hub/openid-connect.md)**
  * 为没有 `end_session_endpoint` 的插件新增 `redirect_after_logout_uri`。[#10653](https://github.com/apache/apisix/pull/10653)

* **[Zipkin](https://docs.apiseven.com/hub/zipkin.md)**
  * 新增 Zipkin 变量。[#10361](https://github.com/apache/apisix/pull/10361)

* **[Proxy Rewrite](https://docs.apiseven.com/hub/proxy-rewrite.md)**

  * 支持匹配多个正则表达式模式。[#9194](https://github.com/apache/apisix/pull/9194)
  * 重写请求头时支持变量。[#9112](https://github.com/apache/apisix/pull/9112)

* **GRPC web**
  * 支持配置 `allow-headers`。[#10904](https://github.com/apache/apisix/pull/10904)

* **[Mocking](https://docs.apiseven.com/hub/mocking.md)**
  * 支持添加 HTTP 标头。[#9720](https://github.com/apache/apisix/pull/9720)

* **[OPA](https://docs.apiseven.com/hub/opa.md)**
  * 支持向上游发送 OPA 返回的请求头。[#9710](https://github.com/apache/apisix/pull/9710)

* **[HTTP Logger](https://docs.apiseven.com/hub/http-logger.md)**
  * Logger 支持压缩响应。[#10884](https://github.com/apache/apisix/pull/10884)

* **[Kafka Logger](https://docs.apiseven.com/hub/kafka-logger.md)**
  * Logger 支持压缩响应。[#10884](https://github.com/apache/apisix/pull/10884)

* **[RocketMQ Logger](https://docs.apiseven.com/hub/rocketmq-logger.md)**
  * Logger 支持压缩响应。[#10884](https://github.com/apache/apisix/pull/10884)

* **[Traffic Split](https://docs.apiseven.com/hub/traffic-split.md)**
  * 支持 HTTPS。[#9115](https://github.com/apache/apisix/pull/9115)

### Admin API[​](#350-features-admin-apis "Admin API的直接链接")

* 新增与**多个上游**相关的 API：

  <!-- -->

  * [在网关组的已发布服务中创建上游](https://docs.apiseven.com/enterprise/3.5.x/admin-api#tag/Published-Service/operation/createPublishedServiceUpstream)。
  * [在网关组的已发布服务中更新上游](https://docs.apiseven.com/enterprise/3.5.x/admin-api#tag/Published-Service/operation/putPublishedServiceUpstream)。
  * [在网关组的已发布服务中修补上游](https://docs.apiseven.com/enterprise/3.5.x/admin-api#tag/Published-Service/operation/patchPublishedServiceUpstream)。
  * [列出网关组的已发布服务中的所有上游](https://docs.apiseven.com/enterprise/3.5.x/admin-api#tag/Published-Service/operation/listPublishedServiceUpstreams)。
  * [获取网关组的已发布服务中的上游](https://docs.apiseven.com/enterprise/3.5.x/admin-api#tag/Published-Service/operation/getPublishedServiceUpstream)。
  * [删除网关组的已发布服务中的上游](https://docs.apiseven.com/enterprise/3.5.x/admin-api#tag/Published-Service/operation/deletePublishedServiceUpstream)。

* 为新功能**上游 mTLS 配置**更新了**已发布服务** API：

  <!-- -->

  * [在网关组中创建已发布服务](https://docs.apiseven.com/enterprise/3.5.x/admin-api#tag/Published-Service/operation/createPublishedService)
    * 新增属性：`client_certificate`、`ca_certificate`、`tls_verify`。
  * [在网关组的已发布服务中创建上游](https://docs.apiseven.com/enterprise/3.5.x/admin-api#tag/Published-Service/operation/createPublishedServiceUpstream)
    * 新增属性：`client_certificate`、`ca_certificate`、`tls_verify`。
  * [更新已发布服务（不发布）](https://docs.apiseven.com/enterprise/3.5.x/admin-api#tag/Published-Service/operation/putPublishedService)
    * 新增属性：`client_certificate`、`ca_certificate`、`tls_verify`。
  * [在网关组的已发布服务中更新上游](https://docs.apiseven.com/enterprise/3.5.x/admin-api#tag/Published-Service/operation/putPublishedServiceUpstream)
    * 新增属性：`client_certificate`、`ca_certificate`、`tls_verify`。

### 控制台（Dashboard）[​](#350-features-console "控制台（Dashboard）的直接链接")

* **一个服务中的多个上游**：对于金丝雀部署、蓝绿部署或管理多个集群等高级场景，一个服务现可使用多个上游。在这种情况下，默认上游是大多数请求的主要目标，其他上游可用于将流量路由到金丝雀部署或备用集群等特定用途。详情请参阅更新后的[配置灰度流量切分](https://docs.apiseven.com/enterprise/getting-started/canary-upstream)。
* 超过许可证 CPU 限额后，禁止创建新资源。
* 为 API7 Portal 控制台页面新增每页条目数选择。
* 插件配置同时支持 YAML 和 JSON 格式。
* 改进上游健康检查配置界面。
* 将**启用/禁用插件**重命名为**添加/删除插件**，以提高准确性。

## 缺陷修复[​](#350-fixes "缺陷修复的直接链接")

### 插件[​](#350-fixes-plugins "插件的直接链接")

* **[Traffic Split](https://docs.apiseven.com/hub/traffic-split.md)**
  * 修复问题：LRU 缓存对象创建函数导致客户端请求异常。
* **[Limit Conn](https://docs.apiseven.com/hub/limit-conn.md)**
  * 修复问题：在 Stream 模式下使用 HTTP 变量时报告属性不存在的错误。[#9816](https://github.com/apache/apisix/pull/9816)
* **[Prometheus](https://docs.apiseven.com/hub/prometheus.md)**
  * 修复问题：禁用 Prometheus 插件后，相关功能未完全关闭。[#11117](https://github.com/apache/apisix/pull/11117)
* **[OpenID Connect](https://docs.apiseven.com/hub/openid-connect.md)**
  * 修复问题：未配置 `redirect_uri` 时将其设为 `ngx.var.request_uri`，导致底层 `lua-resty-openidc` 模块报错。[#7690](https://github.com/apache/apisix/pull/7690)
* **[Zipkin](https://docs.apiseven.com/hub/zipkin.md)**
  * 修复问题：在日志阶段获取到 `nil` 值。[#10666](https://github.com/apache/apisix/pull/10666)
* **[Proxy Rewrite](https://docs.apiseven.com/hub/proxy-rewrite.md)**
  * 修复问题：未设置 `ngx.var.uri` 导致不兼容。[#9309](https://github.com/apache/apisix/pull/9309)
* **Log Rotate**
  * 性能优化：使用 `string.byte` 替换 `string.sub`。[#9984](https://github.com/apache/apisix/pull/9984)
