This is an automated email from the ASF dual-hosted git repository.

tzssangglass pushed a commit to branch patch-1
in repository https://gitbox.apache.org/repos/asf/apisix.git

commit b3bf9fa1b6e1b0e7a80a16d7c3d1f1e39db83d18
Author: tzssangglass <[email protected]>
AuthorDate: Mon Sep 27 09:32:23 2021 +0800

    resolve code review
    
    Signed-off-by: tzssangglass <[email protected]>
---
 docs/en/latest/architecture-design/global-rule.md | 2 ++
 docs/zh/latest/architecture-design/global-rule.md | 5 ++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/docs/en/latest/architecture-design/global-rule.md 
b/docs/en/latest/architecture-design/global-rule.md
index e27b629..7057d6a 100644
--- a/docs/en/latest/architecture-design/global-rule.md
+++ b/docs/en/latest/architecture-design/global-rule.md
@@ -24,6 +24,8 @@ title: Global rule
 [Plugin](plugin.md) just can be bound to [Service](service.md) or 
[Route](route.md), if we want a [Plugin](plugin.md) work on all requests, how 
to do it?
 We can register a global [Plugin](plugin.md) with `GlobalRule`:
 
+When the same plugin is enabled on both `Route` and `Service`, APISIX will 
only execute the plugin on `Route` and the plugin on `Service` is overwritten. 
But the plugin on `GlobalRule` will always be executed, regardless of whether 
the same plugin is enabled on `Route` and `Service`.
+
 ```shell
 curl -X PUT \
   https://{apisix_listen_address}/apisix/admin/global_rules/1 \
diff --git a/docs/zh/latest/architecture-design/global-rule.md 
b/docs/zh/latest/architecture-design/global-rule.md
index 27dc3a2..f717825 100644
--- a/docs/zh/latest/architecture-design/global-rule.md
+++ b/docs/zh/latest/architecture-design/global-rule.md
@@ -24,6 +24,8 @@ title: Global rule
 [Plugin](plugin.md) 只能绑定在 [Service](service.md) 或者 [Route](route.md) 
上,如果我们需要一个能作用于所有请求的 [Plugin](plugin.md) 该怎么办呢?
 这时候我们可以使用 `GlobalRule` 来注册一个全局的 [Plugin](plugin.md):
 
+当 `Route` 和 `Service` 都开启同一个插件时,APISIX 只会执行 `Route` 上的插件,`Service` 上的插件被覆盖。但是 
`GlobalRule` 上的插件一定会执行,无论 `Route` 和 `Service` 上是否开启同一个插件。
+
 ```shell
 curl -X PUT \
   https://{apisix_listen_address}/apisix/admin/global_rules/1 \
@@ -44,9 +46,6 @@ curl -X PUT \
 
 如上所注册的 `limit-count` 插件将会作用于所有的请求。
 
-我们可以通过以下接口查看所有的 `GlobalRule`:
-当 `Route` 和 `Service` 都开启同一个插件时,Route 参数的优先级是高于 Service 
的。但是`GlobalRule`优先级高于`Route`和`Service`
-
 ```shell
 curl https://{apisix_listen_address}/apisix/admin/global_rules -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1'
 ```

Reply via email to