Skip to content

respond

Use the respond directive to return an HTTP response without contacting an upstream.

Status only

Return a status code without a response body:

labels:
  respond: example.com -> 204

Body only

Return a response body:

labels:
  respond: example.com -> "Hello from MXProxy!"

Status and body

Specify both a status code and a response body:

labels:
  respond: example.com -> 418 "I'm a teapot"