juzhiyuan commented on a change in pull request #6218:
URL: https://github.com/apache/apisix/pull/6218#discussion_r793655833



##########
File path: docs/en/latest/plugins/prometheus.md
##########
@@ -46,17 +46,16 @@ plugin_attr:
 
 Assume environment variable `INTRANET_IP` is `172.1.1.1`, now APISIX will 
export the metrics via `172.1.1.1:9092`.
 
-**Before version `2.6`, the metrics are exposed via the data panel port,
-you may need to use [interceptors](../plugin-interceptors.md) to protect it.**
-
-If you still want this behavior, you can configure it like this:
+If you still want expose the metrics via the data panel port, you can 
configure it like this:

Review comment:
       ```suggestion
   If you still want to expose the metrics via the data panel port, you can 
configure it like this:
   ```

##########
File path: docs/zh/latest/plugins/batch-requests.md
##########
@@ -52,8 +52,7 @@ title: batch-requests
 
 ## 接口
 
-插件会增加 `/apisix/batch-requests` 这个接口,你可能需要通过 
[interceptors](../plugin-interceptors.md)
-来保护它。
+插件会增加 `/apisix/batch-requests` 这个接口,你可能需要通过 [public-api](public-api.md) 插件来暴露它。

Review comment:
       ```suggestion
   插件会增加 `/apisix/batch-requests` 这个接口,你需要通过 [public-api](public-api.md) 插件来暴露它。
   ```

##########
File path: docs/en/latest/plugins/prometheus.md
##########
@@ -46,17 +46,16 @@ plugin_attr:
 
 Assume environment variable `INTRANET_IP` is `172.1.1.1`, now APISIX will 
export the metrics via `172.1.1.1:9092`.
 
-**Before version `2.6`, the metrics are exposed via the data panel port,
-you may need to use [interceptors](../plugin-interceptors.md) to protect it.**
-
-If you still want this behavior, you can configure it like this:
+If you still want expose the metrics via the data panel port, you can 
configure it like this:

Review comment:
       We could add the default DP Port?

##########
File path: docs/zh/latest/plugins/jwt-auth.md
##########
@@ -51,8 +51,7 @@ title: jwt-auth
 
 ## 接口
 
-插件会增加 `/apisix/plugin/jwt/sign` 这个接口,你可能需要通过 
[interceptors](../plugin-interceptors.md)
-来保护它。
+插件会增加 `/apisix/plugin/jwt/sign` 这个接口,你可能需要通过 [public-api](public-api.md) 
插件来暴露它。

Review comment:
       ```suggestion
   插件会增加 `/apisix/plugin/jwt/sign` 这个接口,你需要通过 [public-api](public-api.md) 
插件来暴露它。
   ```

##########
File path: docs/zh/latest/plugins/node-status.md
##########
@@ -40,7 +40,7 @@ title: node-status
 
 ## 插件接口
 
-插件增加接口 `/apisix/status`,可通过 [interceptors](../plugin-interceptors.md) 保护该接口。
+插件增加接口 `/apisix/status`,你可能需要通过 [public-api](public-api.md) 插件来暴露它。

Review comment:
       ```suggestion
   插件增加接口 `/apisix/status`,你需要通过 [public-api](public-api.md) 插件来暴露它。
   ```

##########
File path: docs/zh/latest/plugins/wolf-rbac.md
##########
@@ -51,7 +51,7 @@ rbac 功能由 [wolf](https://github.com/iGeeky/wolf) 提供, 有关 `wolf` 
的
 * /apisix/plugin/wolf-rbac/change_pwd
 * /apisix/plugin/wolf-rbac/user_info
 
-你可能需要通过 [interceptors](../plugin-interceptors.md) 来保护它们。
+你可能需要通过 [public-api](public-api.md) 插件来暴露它。

Review comment:
       ```suggestion
   你需要通过 [public-api](public-api.md) 插件来暴露它。
   ```

##########
File path: docs/en/latest/plugins/public-api.md
##########
@@ -0,0 +1,132 @@
+---
+title: public-api
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## Summary
+
+- [**Description**](#description)
+- [**Attributes**](#attributes)
+- [**Example**](#example)
+
+## Description
+
+The `public-api` plugin is used to enhance the plugin public API access 
control.
+When current users develop custom plugins, they can register some public APIs 
for fixed functionality, such as the `/apisix/plugin/jwt/sign` API in 
`jwt-auth`. These APIs can only apply limited plugins for access control 
(currently only `ip-restriction`) by way of plugin interceptors.
+
+With the `public-api` plugin, we put the all public API into general HTTP API 
router, which is consistent with the normal route registered by the user and 
can apply any plugin. The public API added in the user plugin is no longer open 
by default by APISIX, but the user manually configures the route for it, and 
the user can configure any uri and plugin.
+
+## Attributes
+
+| Name | Type | Requirement | Default | Valid | Description |

Review comment:
       ```suggestion
   | Name | Type | Required | Default | Valid | Description |
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to