.. _envoy_v3_api_file_envoy/config/route/v3/route.proto:

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:

    :ref:`api/v2/route.proto <v1.17:envoy_api_file_envoy/api/v2/route.proto>`


* Routing :ref:`architecture overview <arch_overview_http_routing>`
* HTTP :ref:`router filter <config_http_filters_router>`

.. _envoy_v3_api_msg_config.route.v3.RouteConfiguration:

config.route.v3.RouteConfiguration
----------------------------------

:repo:`[config.route.v3.RouteConfiguration proto] <api/envoy/config/route/v3/route.proto#L26>`


.. code-block:: json

  {
    "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": "{...}",
    "request_mirror_policies": []
  }

.. _envoy_v3_api_field_config.route.v3.RouteConfiguration.name:

name
  (`string <https://developers.google.com/protocol-buffers/docs/proto#scalar>`_) The name of the route configuration. For example, it might match
  :ref:`route_config_name
  <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.Rds.route_config_name>` in
  :ref:`envoy_v3_api_msg_extensions.filters.network.http_connection_manager.v3.Rds`.
  
  
.. _envoy_v3_api_field_config.route.v3.RouteConfiguration.virtual_hosts:

virtual_hosts
  (**repeated** :ref:`config.route.v3.VirtualHost <envoy_v3_api_msg_config.route.v3.VirtualHost>`) An array of virtual hosts that make up the route table.
  
  
.. _envoy_v3_api_field_config.route.v3.RouteConfiguration.vhds:

vhds
  (:ref:`config.route.v3.Vhds <envoy_v3_api_msg_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.
  
  
.. _envoy_v3_api_field_config.route.v3.RouteConfiguration.internal_only_headers:

internal_only_headers
  (**repeated** `string <https://developers.google.com/protocol-buffers/docs/proto#scalar>`_) 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 :ref:`config_http_conn_man_headers_x-envoy-internal` for more
  information.
  
  
.. _envoy_v3_api_field_config.route.v3.RouteConfiguration.response_headers_to_add:

response_headers_to_add
  (**repeated** :ref:`config.core.v3.HeaderValueOption <envoy_v3_api_msg_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 :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost` or
  :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`. For more information, including details on
  header value syntax, see the documentation on :ref:`custom request headers
  <config_http_conn_man_headers_custom_request_headers>`.
  
  
.. _envoy_v3_api_field_config.route.v3.RouteConfiguration.response_headers_to_remove:

response_headers_to_remove
  (**repeated** `string <https://developers.google.com/protocol-buffers/docs/proto#scalar>`_) Specifies a list of HTTP headers that should be removed from each response
  that the connection manager encodes.
  
  
.. _envoy_v3_api_field_config.route.v3.RouteConfiguration.request_headers_to_add:

request_headers_to_add
  (**repeated** :ref:`config.core.v3.HeaderValueOption <envoy_v3_api_msg_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 :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost` or
  :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`. For more information, including details on
  header value syntax, see the documentation on :ref:`custom request headers
  <config_http_conn_man_headers_custom_request_headers>`.
  
  
.. _envoy_v3_api_field_config.route.v3.RouteConfiguration.request_headers_to_remove:

request_headers_to_remove
  (**repeated** `string <https://developers.google.com/protocol-buffers/docs/proto#scalar>`_) Specifies a list of HTTP headers that should be removed from each request
  routed by the HTTP connection manager.
  
  
.. _envoy_v3_api_field_config.route.v3.RouteConfiguration.most_specific_header_mutations_wins:

most_specific_header_mutations_wins
  (`bool <https://developers.google.com/protocol-buffers/docs/proto#scalar>`_) 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.
  
  
  
.. _envoy_v3_api_field_config.route.v3.RouteConfiguration.validate_clusters:

validate_clusters
  (`BoolValue <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#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 :ref:`route_config
  <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.route_config>`
  option. This setting default to false if the route table is loaded dynamically via the
  :ref:`rds
  <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.rds>`
  option. Users may wish to override the default behavior in certain cases (for example when
  using CDS with a static route table).
  
  
.. _envoy_v3_api_field_config.route.v3.RouteConfiguration.max_direct_response_body_size_bytes:

max_direct_response_body_size_bytes
  (`UInt32Value <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#uint32value>`_) The maximum bytes of the response :ref:`direct response body
  <envoy_v3_api_field_config.route.v3.DirectResponseAction.body>` size. If not specified the default
  is 4096.
  
  .. warning::
  
    Envoy currently holds the content of :ref:`direct response body
    <envoy_v3_api_field_config.route.v3.DirectResponseAction.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.
  
  
  

.. _envoy_v3_api_field_config.route.v3.RouteConfiguration.request_mirror_policies:

request_mirror_policies
  (**repeated** :ref:`config.route.v3.RouteAction.RequestMirrorPolicy <envoy_v3_api_msg_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.
  
  


.. _envoy_v3_api_msg_config.route.v3.ClusterSpecifierPlugin:

config.route.v3.ClusterSpecifierPlugin
--------------------------------------

:repo:`[config.route.v3.ClusterSpecifierPlugin proto] <api/envoy/config/route/v3/route.proto#L136>`

Configuration for a cluster specifier plugin.

.. code-block:: json

  {
    "extension": "{...}",
    "is_optional": "..."
  }

.. _envoy_v3_api_field_config.route.v3.ClusterSpecifierPlugin.extension:

extension
  (:ref:`config.core.v3.TypedExtensionConfig <envoy_v3_api_msg_config.core.v3.TypedExtensionConfig>`) The name of the plugin and its opaque configuration.
  
  
.. _envoy_v3_api_field_config.route.v3.ClusterSpecifierPlugin.is_optional:

is_optional
  (`bool <https://developers.google.com/protocol-buffers/docs/proto#scalar>`_) If is_optional is not set and the plugin defined by this message is not
  a supported type, the containing resource is NACKed. If is_optional is
  set, the resource would not be NACKed for this reason. In this case,
  routes referencing this plugin's name would not be treated as an illegal
  configuration, but would result in a failure if the route is selected.
  
  


.. _envoy_v3_api_msg_config.route.v3.Vhds:

config.route.v3.Vhds
--------------------

:repo:`[config.route.v3.Vhds proto] <api/envoy/config/route/v3/route.proto#L148>`


.. code-block:: json

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

.. _envoy_v3_api_field_config.route.v3.Vhds.config_source:

config_source
  (:ref:`config.core.v3.ConfigSource <envoy_v3_api_msg_config.core.v3.ConfigSource>`, *REQUIRED*) Configuration source specifier for VHDS.