This is an automated email from the ASF dual-hosted git repository.
sylviasu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new e472d4056 docs: fix code block (#8700)
e472d4056 is described below
commit e472d4056f7fe3f9d4e7fc4e97f1d1569ff73d9b
Author: Abhishek Choudhary <[email protected]>
AuthorDate: Wed Jan 18 06:44:05 2023 +0530
docs: fix code block (#8700)
* docs: fix code block
* docs: add line break
---
docs/en/latest/terminology/plugin-config.md | 53 +++++++++++++++--------------
1 file changed, 27 insertions(+), 26 deletions(-)
diff --git a/docs/en/latest/terminology/plugin-config.md
b/docs/en/latest/terminology/plugin-config.md
index 3c1ec9d1d..81d5ba732 100644
--- a/docs/en/latest/terminology/plugin-config.md
+++ b/docs/en/latest/terminology/plugin-config.md
@@ -36,34 +36,35 @@ While configuring the same plugin, only one copy of the
configuration is valid.
The example below illustrates how to create a Plugin Config and bind it to a
Route:
- ```shell
- curl http://127.0.0.1:9180/apisix/admin/plugin_configs/1 \
- -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
- {
- "desc": "blah",
- "plugins": {
- "limit-count": {
- "count": 2,
- "time_window": 60,
- "rejected_code": 503
- }
+```shell
+curl http://127.0.0.1:9180/apisix/admin/plugin_configs/1 \
+-H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
+{
+ "desc": "blah",
+ "plugins": {
+ "limit-count": {
+ "count": 2,
+ "time_window": 60,
+ "rejected_code": 503
}
- }'
- ```
-
- ```shell
- curl http://127.0.0.1:9180/apisix/admin/routes/1 -H 'X-API-KEY:
edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
- {
- "uris": ["/index.html"],
- "plugin_config_id": 1,
- "upstream": {
- "type": "roundrobin",
- "nodes": {
- "127.0.0.1:1980": 1
- }
+ }
+}'
+```
+
+```shell
+curl http://127.0.0.1:9180/apisix/admin/routes/1 \
+-H 'X-API-KEY:edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
+{
+ "uris": ["/index.html"],
+ "plugin_config_id": 1,
+ "upstream": {
+ "type": "roundrobin",
+ "nodes": {
+ "127.0.0.1:1980": 1
}
- }'
- ```
+ }
+}'
+```
When APISIX can't find the Plugin Config with the `id`, the requests reaching
this Route are terminated with a status code of `503`.