Skip to main content

Module echo

Module echo 

Source
Expand description

The echo node — replaces or wraps the response body and adds response headers. A response-phase node: place it after upstream (between upstream and client) so it sees the upstream response.

Port of APISIX’s echo plugin (which APISIX itself documents as a demo/util plugin). before_body/body/after_body map to APISIX’s body_filter behavior and headers to its header_filter behavior.

Structs§

EchoPlugin
Rewrites the response: body replaces the upstream body, then before_body / after_body are concatenated around it, and headers are set on the response (replacing any existing values, like ngx.header[...]).

Functions§

optional_string 🔒
Reads an optional string key, rejecting non-string values.