Skip to main content

Module redirect

Module redirect 

Source
Expand description

The redirect node — answers the request with an HTTP redirect instead of proxying it upstream.

Port of APISIX’s redirect plugin (the uri and http_to_https modes; APISIX’s regex_uri and encode_uri are not implemented, and http_to_https always redirects to the default HTTPS port — there is no https_port plugin attribute).

Redirecting stops the pipeline in featherbit terms: the plugin fills in context.response (status + location) and returns success, so the node’s success edge should go straight to client.in — not through an upstream node, which would overwrite the response.

Structs§

RedirectPlugin
Builds a redirect response from either a uri template (with $var interpolation) or the http_to_https shortcut.