kwanhur commented on code in PR #6750:
URL: https://github.com/apache/apisix/pull/6750#discussion_r846617247
##########
docs/en/latest/plugins/response-rewrite.md:
##########
@@ -32,13 +32,20 @@ response rewrite plugin, rewrite the content returned by
the upstream as well as
## Attributes
-| Name | Type | Requirement | Default | Valid | Description
|
-| ----------- | ------- | ----------- | ------- | ---------- |
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-| status_code | integer | optional | | [200, 598] | New `status
code` to client, keep the original response code by default.
|
-| body | string | optional | | | New `body` to
client, and the content-length will be reset too.
|
-| body_base64 | boolean | optional | false | | Identify if
`body` in configuration need base64 decoded before rewrite to client.
|
-| headers | object | optional | | | Set the new
`headers` for client, can set up multiple. If it exists already from upstream,
will rewrite the header, otherwise will add the header. You can set the
corresponding value to an empty string to remove a header. The value can
contain Nginx variables in `$var` format, like `$remote_addr $balancer_ip` |
-| vars | array[] | optional | | | A DSL to evaluate
with the given ngx.var. See `vars`
[lua-resty-expr](https://github.com/api7/lua-resty-expr#operator-list). if the
`vars` is empty, then all rewrite operations will be executed unconditionally |
+| Name | Type | Requirement | Default | Valid |
Description
|
+|-----------------|---------|-------------|---------|-----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| status_code | integer | optional | | [200, 598] | New
`status code` to client, keep the original response code by default.
|
+| body | string | optional | | | New
`body` to client, and the content-length will be reset too.
|
+| body_base64 | boolean | optional | false | |
Identify if `body` in configuration need base64 decoded before rewrite to
client.
|
+| headers | object | optional | | | Set
the new `headers` for client, can set up multiple. If it exists already from
upstream, will rewrite the header, otherwise will add the header. You can set
the corresponding value to an empty string to remove a header. The value can
contain Nginx variables in `$var` format, like `$remote_addr $balancer_ip`. |
+| vars | array[] | optional | | | A DSL
to evaluate with the given ngx.var. See `vars`
[lua-resty-expr](https://github.com/api7/lua-resty-expr#operator-list). if the
`vars` is empty, then all rewrite operations will be executed unconditionally.
|
+| filters | array[] | optional | | | A
group of filters that modify response body by replacing one specified string by
another.
|
+| filters.regex | string | required | | | match
pattern on response body.
|
+| filters.scope | string | optional | "once" | "once","global" |
substitution range.
|
Review Comment:
Yep, had added their usage.
--
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]