1syntax = "proto3"; 2 3package envoy.extensions.filters.http.router.v3; 4 5import "envoy/config/accesslog/v3/accesslog.proto"; 6import "envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto"; 7 8import "google/protobuf/duration.proto"; 9import "google/protobuf/wrappers.proto"; 10 11import "udpa/annotations/status.proto"; 12import "udpa/annotations/versioning.proto"; 13import "validate/validate.proto"; 14 15option java_package = "io.envoyproxy.envoy.extensions.filters.http.router.v3"; 16option java_outer_classname = "RouterProto"; 17option java_multiple_files = true; 18option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/router/v3;routerv3"; 19option (udpa.annotations.file_status).package_version_status = ACTIVE; 20 21// [#protodoc-title: Router] 22// Router :ref:`configuration overview <config_http_filters_router>`. 23// [#extension: envoy.filters.http.router] 24 25// [#next-free-field: 10] 26message Router { 27 option (udpa.annotations.versioning).previous_message_type = 28 "envoy.config.filter.http.router.v2.Router"; 29 30 message UpstreamAccessLogOptions { 31 // If set to true, an upstream access log will be recorded when an upstream stream is 32 // associated to an http request. Note: Each HTTP request received for an already established 33 // connection will result in an upstream access log record. This includes, for example, 34 // consecutive HTTP requests over the same connection or a request that is retried. 35 // In case a retry is applied, an upstream access log will be recorded for each retry. 36 bool flush_upstream_log_on_upstream_stream = 1; 37 38 // The interval to flush the upstream access logs. By default, the router will flush an upstream 39 // access log on stream close, when the HTTP request is complete. If this field is set, the router 40 // will flush access logs periodically at the specified interval. This is especially useful in the 41 // case of long-lived requests, such as CONNECT and Websockets. 42 // The interval must be at least 1 millisecond. 43 google.protobuf.Duration upstream_log_flush_interval = 2 44 [(validate.rules).duration = {gte {nanos: 1000000}}]; 45 } 46 47 // Whether the router generates dynamic cluster statistics. Defaults to 48 // true. Can be disabled in high performance scenarios. 49 google.protobuf.BoolValue dynamic_stats = 1; 50 51 // Whether to start a child span for egress routed calls. This can be 52 // useful in scenarios where other filters (auth, ratelimit, etc.) make 53 // outbound calls and have child spans rooted at the same ingress 54 // parent. Defaults to false. 55 bool start_child_span = 2; 56 57 // Configuration for HTTP upstream logs emitted by the router. Upstream logs 58 // are configured in the same way as access logs, but each log entry represents 59 // an upstream request. Presuming retries are configured, multiple upstream 60 // requests may be made for each downstream (inbound) request. 61 repeated config.accesslog.v3.AccessLog upstream_log = 3; 62 63 // Additional upstream access log options. 64 UpstreamAccessLogOptions upstream_log_options = 9; 65 66 // Do not add any additional ``x-envoy-`` headers to requests or responses. This 67 // only affects the :ref:`router filter generated x-envoy- headers 68 // <config_http_filters_router_headers_set>`, other Envoy filters and the HTTP 69 // connection manager may continue to set ``x-envoy-`` headers. 70 bool suppress_envoy_headers = 4; 71 72 // Specifies a list of HTTP headers to strictly validate. Envoy will reject a 73 // request and respond with HTTP status 400 if the request contains an invalid 74 // value for any of the headers listed in this field. Strict header checking 75 // is only supported for the following headers: 76 // 77 // Value must be a ','-delimited list (i.e. no spaces) of supported retry 78 // policy values: 79 // 80 // * :ref:`config_http_filters_router_x-envoy-retry-grpc-on` 81 // * :ref:`config_http_filters_router_x-envoy-retry-on` 82 // 83 // Value must be an integer: 84 // 85 // * :ref:`config_http_filters_router_x-envoy-max-retries` 86 // * :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms` 87 // * :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms` 88 repeated string strict_check_headers = 5 [(validate.rules).repeated = { 89 items { 90 string { 91 in: "x-envoy-upstream-rq-timeout-ms" 92 in: "x-envoy-upstream-rq-per-try-timeout-ms" 93 in: "x-envoy-max-retries" 94 in: "x-envoy-retry-grpc-on" 95 in: "x-envoy-retry-on" 96 } 97 } 98 }]; 99 100 // If not set, ingress Envoy will ignore 101 // :ref:`config_http_filters_router_x-envoy-expected-rq-timeout-ms` header, populated by egress 102 // Envoy, when deriving timeout for upstream cluster. 103 bool respect_expected_rq_timeout = 6; 104 105 // If set, Envoy will avoid incrementing HTTP failure code stats 106 // on gRPC requests. This includes the individual status code value 107 // (e.g. upstream_rq_504) and group stats (e.g. upstream_rq_5xx). 108 // This field is useful if interested in relying only on the gRPC 109 // stats filter to define success and failure metrics for gRPC requests 110 // as not all failed gRPC requests charge HTTP status code metrics. See 111 // :ref:`gRPC stats filter<config_http_filters_grpc_stats>` documentation 112 // for more details. 113 bool suppress_grpc_request_failure_code_stats = 7; 114 115 // .. note:: 116 // Upstream HTTP filters are currently in alpha. 117 // 118 // Optional HTTP filters for the upstream filter chain. 119 // 120 // These filters will be applied for all requests that pass through the router. 121 // They will also be applied to shadowed requests. 122 // Upstream filters cannot change route or cluster. 123 // Upstream filters specified on the cluster will override these filters. 124 // 125 // If using upstream filters, please be aware that local errors sent by 126 // upstream filters will not trigger retries, and local errors sent by 127 // upstream filters will count as a final response if hedging is configured. 128 // [#extension-category: envoy.filters.http.upstream] 129 repeated network.http_connection_manager.v3.HttpFilter upstream_http_filters = 8; 130} 131