route.proto 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. syntax = "proto3";
  2. package envoy.api.v2;
  3. import "envoy/api/v2/core/base.proto";
  4. import "envoy/api/v2/core/config_source.proto";
  5. import "envoy/api/v2/route/route_components.proto";
  6. import "google/protobuf/wrappers.proto";
  7. import "udpa/annotations/migrate.proto";
  8. import "udpa/annotations/status.proto";
  9. import "validate/validate.proto";
  10. option java_package = "io.envoyproxy.envoy.api.v2";
  11. option java_outer_classname = "RouteProto";
  12. option java_multiple_files = true;
  13. option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2;apiv2";
  14. option (udpa.annotations.file_migrate).move_to_package = "envoy.config.route.v3";
  15. option (udpa.annotations.file_status).package_version_status = FROZEN;
  16. // [#protodoc-title: HTTP route configuration]
  17. // * Routing :ref:`architecture overview <arch_overview_http_routing>`
  18. // * HTTP :ref:`router filter <config_http_filters_router>`
  19. // [#next-free-field: 11]
  20. message RouteConfiguration {
  21. // The name of the route configuration. For example, it might match
  22. // :ref:`route_config_name
  23. // <envoy_api_field_config.filter.network.http_connection_manager.v2.Rds.route_config_name>` in
  24. // :ref:`envoy_api_msg_config.filter.network.http_connection_manager.v2.Rds`.
  25. string name = 1;
  26. // An array of virtual hosts that make up the route table.
  27. repeated route.VirtualHost virtual_hosts = 2;
  28. // An array of virtual hosts will be dynamically loaded via the VHDS API.
  29. // Both *virtual_hosts* and *vhds* fields will be used when present. *virtual_hosts* can be used
  30. // for a base routing table or for infrequently changing virtual hosts. *vhds* is used for
  31. // on-demand discovery of virtual hosts. The contents of these two fields will be merged to
  32. // generate a routing table for a given RouteConfiguration, with *vhds* derived configuration
  33. // taking precedence.
  34. Vhds vhds = 9;
  35. // Optionally specifies a list of HTTP headers that the connection manager
  36. // will consider to be internal only. If they are found on external requests they will be cleaned
  37. // prior to filter invocation. See :ref:`config_http_conn_man_headers_x-envoy-internal` for more
  38. // information.
  39. repeated string internal_only_headers = 3 [
  40. (validate.rules).repeated = {items {string {well_known_regex: HTTP_HEADER_NAME strict: false}}}
  41. ];
  42. // Specifies a list of HTTP headers that should be added to each response that
  43. // the connection manager encodes. Headers specified at this level are applied
  44. // after headers from any enclosed :ref:`envoy_api_msg_route.VirtualHost` or
  45. // :ref:`envoy_api_msg_route.RouteAction`. For more information, including details on
  46. // header value syntax, see the documentation on :ref:`custom request headers
  47. // <config_http_conn_man_headers_custom_request_headers>`.
  48. repeated core.HeaderValueOption response_headers_to_add = 4
  49. [(validate.rules).repeated = {max_items: 1000}];
  50. // Specifies a list of HTTP headers that should be removed from each response
  51. // that the connection manager encodes.
  52. repeated string response_headers_to_remove = 5 [
  53. (validate.rules).repeated = {items {string {well_known_regex: HTTP_HEADER_NAME strict: false}}}
  54. ];
  55. // Specifies a list of HTTP headers that should be added to each request
  56. // routed by the HTTP connection manager. Headers specified at this level are
  57. // applied after headers from any enclosed :ref:`envoy_api_msg_route.VirtualHost` or
  58. // :ref:`envoy_api_msg_route.RouteAction`. For more information, including details on
  59. // header value syntax, see the documentation on :ref:`custom request headers
  60. // <config_http_conn_man_headers_custom_request_headers>`.
  61. repeated core.HeaderValueOption request_headers_to_add = 6
  62. [(validate.rules).repeated = {max_items: 1000}];
  63. // Specifies a list of HTTP headers that should be removed from each request
  64. // routed by the HTTP connection manager.
  65. repeated string request_headers_to_remove = 8 [
  66. (validate.rules).repeated = {items {string {well_known_regex: HTTP_HEADER_NAME strict: false}}}
  67. ];
  68. // By default, headers that should be added/removed are evaluated from most to least specific:
  69. //
  70. // * route level
  71. // * virtual host level
  72. // * connection manager level
  73. //
  74. // To allow setting overrides at the route or virtual host level, this order can be reversed
  75. // by setting this option to true. Defaults to false.
  76. //
  77. // [#next-major-version: In the v3 API, this will default to true.]
  78. bool most_specific_header_mutations_wins = 10;
  79. // An optional boolean that specifies whether the clusters that the route
  80. // table refers to will be validated by the cluster manager. If set to true
  81. // and a route refers to a non-existent cluster, the route table will not
  82. // load. If set to false and a route refers to a non-existent cluster, the
  83. // route table will load and the router filter will return a 404 if the route
  84. // is selected at runtime. This setting defaults to true if the route table
  85. // is statically defined via the :ref:`route_config
  86. // <envoy_api_field_config.filter.network.http_connection_manager.v2.HttpConnectionManager.route_config>`
  87. // option. This setting default to false if the route table is loaded dynamically via the
  88. // :ref:`rds
  89. // <envoy_api_field_config.filter.network.http_connection_manager.v2.HttpConnectionManager.rds>`
  90. // option. Users may wish to override the default behavior in certain cases (for example when
  91. // using CDS with a static route table).
  92. google.protobuf.BoolValue validate_clusters = 7;
  93. }
  94. message Vhds {
  95. // Configuration source specifier for VHDS.
  96. core.ConfigSource config_source = 1 [(validate.rules).message = {required: true}];
  97. }