Proxy
The proxy
block creates and executes a proxy request to a backend service.
📝 Multiple
proxy
andrequest
blocks are executed in parallel.
Block name | Context | Label |
---|---|---|
proxy | Endpoint Block | See Label description below. |
Label: If defined in an Endpoint Block, a proxy
block or Request Block w/o a label has an implicit name "default"
. If defined in the Definitions Block, the label of proxy
is used as reference in Endpoint Blocks and the name can be defined via name
attribute. Only one proxy
block or Request Block w/ label "default"
per Endpoint Block is allowed.
Attributes
Name | Type | Default | Description |
---|---|---|---|
add_form_params | object | - | Key/value pairs to add form parameters to the upstream request body. |
add_query_params | object | - | Key/value pairs to add query parameters to the upstream request URL. |
add_request_headers | object | - | Key/value pairs to add as request headers in the upstream request. |
add_response_headers | object | - | Key/value pairs to add as response headers in the client response. |
backend | string | - | References a backend in definitions for the proxy request. Mutually exclusive with |
expected_status | tuple (int) | [] | If defined, the response status code will be verified against this list of codes. If the status code not included in this list an |
name | string | "default" | Defines the proxy request name. Allowed only in the |
remove_form_params | object | - | List of names to remove form parameters from the upstream request body. |
remove_query_params | tuple (string) | [] | List of names to remove query parameters from the upstream request URL. |
remove_request_headers | tuple (string) | [] | List of names to remove headers from the upstream request. |
remove_response_headers | tuple (string) | [] | List of names to remove headers from the client response. |
set_form_params | object | - | Key/value pairs to set query parameters in the upstream request URL. |
set_query_params | object | - | Key/value pairs to set query parameters in the upstream request URL. |
set_request_headers | object | - | Key/value pairs to set as request headers in the upstream request. |
set_response_headers | object | - | Key/value pairs to set as response headers in the client response. |
url | string | - | URL of the resource to request. May be relative to an origin specified in a referenced or nested |
websockets | bool | false | Allows support for WebSockets. This attribute is only allowed in the "default" proxy block. Other |
If the url
attribute is specified and its value is an absolute URL, the protocol and host parts must be the same as in the value of the {origin} attribute of the used backend.
Nested Blocks
Name | Description |
---|---|
backend | Configures a backend for the proxy request (zero or one). Mutually exclusive with |
websockets | Configures support for websockets connections (zero or one). Mutually exclusive with |