Skip to content

Commit

Permalink
docs: remove auth value
Browse files Browse the repository at this point in the history
  • Loading branch information
ezioruan committed Apr 15, 2021
1 parent cd4d2ec commit cebd8d7
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 16 deletions.
4 changes: 0 additions & 4 deletions apisix/plugins/echo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ local schema = {
type = "object",
minProperties = 1,
},
auth_value = {
description = "auth value",
type = "string"
},
},
anyOf = {
{required = {"before_body"}},
Expand Down
1 change: 0 additions & 1 deletion docs/en/latest/plugins/echo.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ This plugin addresses the corresponding functionality in the common phases such
| body | string | optional | | | Body to replace upstream response. |
| after_body | string | optional | | | Body after the modification of filter phase. |
| headers | object | optional | | | New headers for response |
| auth_value | string | optional | | | Auth value |

At least one of `before_body`, `body`, and `after_body` must be specified.

Expand Down
1 change: 0 additions & 1 deletion docs/zh/latest/plugins/echo.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ echo 可以帮助用户尽可能全面地了解如何开发APISIX插件。
| body | string | 可选 | | | 返回给客户端的响应内容,它将覆盖 upstream 返回的响应 body。 |
| after_body | string | 可选 | | | 在 body 属性之后添加的内容,如果 body 属性没有指定将在 upstream 响应 body 之后添加。 |
| headers | object | 可选 | | | 返回值的 headers |
| auth_value | string | 可选 | | | |

参数 before_body,body 和 after_body 至少要存在一个

Expand Down
11 changes: 1 addition & 10 deletions t/plugin/echo.t
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ done
"Location":"https://www.iresty.com",
"Authorization": "userpass"
},
"auth_value" : "userpass"
}
},
"upstream": {
Expand All @@ -108,7 +107,6 @@ done
"headers": {
"Location":"https://www.iresty.com"
},
"auth_value" : "userpass"
}
},
"upstream": {
Expand Down Expand Up @@ -167,7 +165,6 @@ Authorization: userpass
"plugins": {
"echo": {
"before_body": "before the body modification ",
"auth_value" : "userpass",
"headers": {
"Location":"https://www.iresty.com"
}
Expand All @@ -187,7 +184,6 @@ Authorization: userpass
"plugins": {
"echo": {
"before_body": "before the body modification ",
"auth_value" : "userpass",
"headers": {
"Location":"https://www.iresty.com"
}
Expand Down Expand Up @@ -249,7 +245,6 @@ Location: https://www.iresty.com
"plugins": {
"echo": {
"before_body": "before the body modification ",
"auth_value" : "userpassword",
"headers": {
"Location":"https://www.iresty.com"
}
Expand All @@ -269,7 +264,6 @@ Location: https://www.iresty.com
"plugins": {
"echo": {
"before_body": "before the body modification ",
"auth_value" : "userpassword",
"headers": {
"Location":"https://www.iresty.com"
}
Expand Down Expand Up @@ -405,7 +399,6 @@ Location: https://www.iresty.com
"plugins": {
"echo": {
"before_body": "before the body modification ",
"auth_value" : "userpass",
"headers": {
"Location":"https://www.iresty.com"
}
Expand All @@ -425,7 +418,6 @@ Location: https://www.iresty.com
"plugins": {
"echo": {
"before_body": "before the body modification ",
"auth_value" : "userpass",
"headers": {
"Location":"https://www.iresty.com"
}
Expand Down Expand Up @@ -485,7 +477,6 @@ Location: https://www.iresty.com
"plugins": {
"echo": {
"before_body": "before the body modification ",
"auth_value" : "userpass",
"headers": {
"Location":"https://www.iresty.com"
}
Expand All @@ -506,7 +497,7 @@ Location: https://www.iresty.com
--- request
GET /t
--- response_body
{"echo":{"auth_value":"userpass","before_body":"before the body modification ","headers":{"Location":"https://www.iresty.com"}}}
{"echo":{"before_body":"before the body modification ","headers":{"Location":"https://www.iresty.com"}}}
--- no_error_log
[error]

Expand Down

0 comments on commit cebd8d7

Please sign in to comment.