Parameters
See plugin common configurations for configuration options available to all plugins.
status_code
vaild vaule:
between 200 and 598 inclusive
New HTTP status code in the response.
body
New response body. The
Content-Lengthheader would also be reset. Should not be configured withfilters.body_base64
If true, decode the response body configured in
bodybefore sending to client, which is useful for image and protobuf decoding. Note that this configuration cannot be used to decode upstream response.headers
Actions to be executed in the order of
add,remove, andset.add
Headers to append to responses. If a header is already present in the response, the header value will be appended. Header value could be set to a constant, or one or more built-in variables.
set
Headers to set in responses. If a header is already present in the response, the header value will be overwritten. Header value could be set to a constant, or one or more built-in variables.
remove
Headers to remove from responses.
vars
An array of one or more matching conditions in the form of APISIX expressions to conditionally execute the plugin.
filters
List of filters that modify the response body by replacing one specified string with another. Should not be configured with
body.regex
RegEx pattern to match on the response body.
scope
vaild vaule:
onceorglobalScope of substitution.
oncesubstitutes the first matched instance andglobalsubstitutes globally.replace
Content to substitute with.
options
RegEx options to control how the match operation should be performed. See Lua NGINX module for the available options.
max_resp_body_size
Maximum response body size in bytes buffered into memory when filters are applied. Larger responses are truncated. Available in API7 Enterprise from version 3.9.17 on the 3.9 line and from version 3.10.4 on the 3.10 line.