HTTP route configuration

This documentation is for the Envoy v3 API.

As of Envoy v1.18 the v2 API has been removed and is no longer supported.

If you are upgrading from v2 API config you may wish to view the v2 API documentation:

config.route.v3.RouteConfiguration

[config.route.v3.RouteConfiguration proto]

{
  "name": "...",
  "virtual_hosts": [],
  "vhds": "{...}",
  "internal_only_headers": [],
  "response_headers_to_add": [],
  "response_headers_to_remove": [],
  "request_headers_to_add": [],
  "request_headers_to_remove": [],
  "most_specific_header_mutations_wins": "...",
  "validate_clusters": "{...}",
  "max_direct_response_body_size_bytes": "{...}",
  "cluster_specifier_plugins": [],
  "request_mirror_policies": [],
  "ignore_port_in_host_matching": "..."
}
name

(string) The name of the route configuration. For example, it might match route_config_name in extensions.filters.network.http_connection_manager.v3.Rds.

virtual_hosts

(repeated config.route.v3.VirtualHost) An array of virtual hosts that make up the route table.

vhds

(config.route.v3.Vhds) An array of virtual hosts will be dynamically loaded via the VHDS API. Both virtual_hosts and vhds fields will be used when present. virtual_hosts can be used for a base routing table or for infrequently changing virtual hosts. vhds is used for on-demand discovery of virtual hosts. The contents of these two fields will be merged to generate a routing table for a given RouteConfiguration, with vhds derived configuration taking precedence.

internal_only_headers

(repeated string) Optionally specifies a list of HTTP headers that the connection manager will consider to be internal only. If they are found on external requests they will be cleaned prior to filter invocation. See x-envoy-internal for more information.

response_headers_to_add

(repeated config.core.v3.HeaderValueOption) Specifies a list of HTTP headers that should be added to each response that the connection manager encodes. Headers specified at this level are applied after headers from any enclosed config.route.v3.VirtualHost or config.route.v3.RouteAction. For more information, including details on header value syntax, see the documentation on custom request headers.

response_headers_to_remove

(repeated string) Specifies a list of HTTP headers that should be removed from each response that the connection manager encodes.

request_headers_to_add

(repeated config.core.v3.HeaderValueOption) Specifies a list of HTTP headers that should be added to each request routed by the HTTP connection manager. Headers specified at this level are applied after headers from any enclosed config.route.v3.VirtualHost or config.route.v3.RouteAction. For more information, including details on header value syntax, see the documentation on custom request headers.

request_headers_to_remove

(repeated string) Specifies a list of HTTP headers that should be removed from each request routed by the HTTP connection manager.

most_specific_header_mutations_wins

(bool) By default, headers that should be added/removed are evaluated from most to least specific:

  • route level

  • virtual host level

  • connection manager level

To allow setting overrides at the route or virtual host level, this order can be reversed by setting this option to true. Defaults to false.

validate_clusters

(BoolValue) An optional boolean that specifies whether the clusters that the route table refers to will be validated by the cluster manager. If set to true and a route refers to a non-existent cluster, the route table will not load. If set to false and a route refers to a non-existent cluster, the route table will load and the router filter will return a 404 if the route is selected at runtime. This setting defaults to true if the route table is statically defined via the route_config option. This setting default to false if the route table is loaded dynamically via the rds option. Users may wish to override the default behavior in certain cases (for example when using CDS with a static route table).

max_direct_response_body_size_bytes

(UInt32Value) The maximum bytes of the response direct response body size. If not specified the default is 4096.

Warning

Envoy currently holds the content of direct response body in memory. Be careful setting this to be larger than the default 4KB, since the allocated memory for direct response body is not subject to data plane buffering controls.

cluster_specifier_plugins

(repeated config.route.v3.ClusterSpecifierPlugin) A list of plugins and their configurations which may be used by a cluster specifier plugin name within the route. All extension.name fields in this list must be unique.

request_mirror_policies

(repeated config.route.v3.RouteAction.RequestMirrorPolicy) Specify a set of default request mirroring policies which apply to all routes under its virtual hosts. Note that policies are not merged, the most specific non-empty one becomes the mirror policies.

ignore_port_in_host_matching

(bool) By default, port in :authority header (if any) is used in host matching. With this option enabled, Envoy will ignore the port number in the :authority header (if any) when picking VirtualHost. NOTE: this option will not strip the port number (if any) contained in route config config.route.v3.VirtualHost.domains field.

config.route.v3.Vhds

[config.route.v3.Vhds proto]

{
  "config_source": "{...}"
}
config_source

(config.core.v3.ConfigSource, REQUIRED) Configuration source specifier for VHDS.