spacewander commented on a change in pull request #5933:
URL: https://github.com/apache/apisix/pull/5933#discussion_r775451101



##########
File path: docs/en/latest/plugin-develop.md
##########
@@ -493,4 +493,12 @@ function _M.control_api()
 end
 ```
 
-If you don't change the default control API configuration, the plugin will be 
expose `GET /v1/plugin/example-plugin/hello` which can only be accessed via 
`127.0.0.1`.
+If you don't change the default control API configuration, the plugin will 
expose `GET /v1/plugin/example-plugin/hello` which can only be accessed via 
`127.0.0.1`. Test with the following command:
+
+```shell
+curl -i -X GET "http://localhost:9090/v1/plugin/example-plugin/hello";
+```
+
+:::note Note
+By default, the control API server is enabled and listens to `127.0.0.1:9090`. 
You can change it via the `control` section under `apisix` in 
`conf/config.yaml`: [Read more about control API introduction](./control-api)

Review comment:
       Missing a `.md` in the link? And better to give an example of the new 
configuration.

##########
File path: docs/en/latest/plugin-develop.md
##########
@@ -493,4 +493,12 @@ function _M.control_api()
 end
 ```
 
-If you don't change the default control API configuration, the plugin will be 
expose `GET /v1/plugin/example-plugin/hello` which can only be accessed via 
`127.0.0.1`.
+If you don't change the default control API configuration, the plugin will 
expose `GET /v1/plugin/example-plugin/hello` which can only be accessed via 
`127.0.0.1`. Test with the following command:
+
+```shell
+curl -i -X GET "http://localhost:9090/v1/plugin/example-plugin/hello";

Review comment:
       There is no requirement that `localhost` should be always mapped to 
`127.0.0.1`.

##########
File path: docs/en/latest/plugin-develop.md
##########
@@ -493,4 +493,12 @@ function _M.control_api()
 end
 ```
 
-If you don't change the default control API configuration, the plugin will be 
expose `GET /v1/plugin/example-plugin/hello` which can only be accessed via 
`127.0.0.1`.
+If you don't change the default control API configuration, the plugin will 
expose `GET /v1/plugin/example-plugin/hello` which can only be accessed via 
`127.0.0.1`. Test with the following command:
+
+```shell
+curl -i -X GET "http://localhost:9090/v1/plugin/example-plugin/hello";
+```
+
+:::note Note

Review comment:
       Is it necessary to use `:::note`? If not, we can remove it.




-- 
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