conn_manager: allow to remove port from host header (#10960)

add an api option/conn manager feature which would allow to remove port part from Host header (e.g. would transform
example:443 to example. this would simplify domain's matching inside virtual host as well as would not require explicit matching on "domain:port" in upstream proxies.

Signed-off-by: Nikita V. Shirokov <tehnerd@tehnerd.com>

Mirrored from https://github.com/envoyproxy/envoy @ 111684faa1d28f34fb16af43911c575c6815c450
master-ci-test
data-plane-api(CircleCI) 5 years ago
parent f89ab41ddc
commit 0a7d55ad12
  1. 10
      envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto
  2. 10
      envoy/extensions/filters/network/http_connection_manager/v4alpha/http_connection_manager.proto

@ -30,7 +30,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
// HTTP connection manager :ref:`configuration overview <config_http_conn_man>`.
// [#extension: envoy.filters.network.http_connection_manager]
// [#next-free-field: 39]
// [#next-free-field: 40]
message HttpConnectionManager {
option (udpa.annotations.versioning).previous_message_type =
"envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager";
@ -511,6 +511,14 @@ message HttpConnectionManager {
// host will not be overwritten by the HTTP Connection Manager. The default behaviour is
// to overwrite the `date` header unconditionally.
bool preserve_upstream_date = 38;
// Determines if the port part should be removed from host/authority header before any processing
// of request by HTTP filters or routing. The port would be removed only if it is equal to the :ref:`listener's<envoy_api_field_config.listener.v3.Listener.address>`
// local port and request method is not CONNECT. This affects the upstream host header as well.
// Without setting this option, incoming requests with host `example:443` will not match against
// route with :ref:`domains<envoy_api_field_config.route.v3.VirtualHost.domains>` match set to `example`. Defaults to `false`. Note that port removal is not part
// of `HTTP spec <https://tools.ietf.org/html/rfc3986>` and is provided for convenience.
bool strip_matching_host_port = 39;
}
message Rds {

@ -30,7 +30,7 @@ option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSIO
// HTTP connection manager :ref:`configuration overview <config_http_conn_man>`.
// [#extension: envoy.filters.network.http_connection_manager]
// [#next-free-field: 39]
// [#next-free-field: 40]
message HttpConnectionManager {
option (udpa.annotations.versioning).previous_message_type =
"envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager";
@ -511,6 +511,14 @@ message HttpConnectionManager {
// host will not be overwritten by the HTTP Connection Manager. The default behaviour is
// to overwrite the `date` header unconditionally.
bool preserve_upstream_date = 38;
// Determines if the port part should be removed from host/authority header before any processing
// of request by HTTP filters or routing. The port would be removed only if it is equal to the :ref:`listener's<envoy_api_field_config.listener.v4alpha.Listener.address>`
// local port and request method is not CONNECT. This affects the upstream host header as well.
// Without setting this option, incoming requests with host `example:443` will not match against
// route with :ref:`domains<envoy_api_field_config.route.v4alpha.VirtualHost.domains>` match set to `example`. Defaults to `false`. Note that port removal is not part
// of `HTTP spec <https://tools.ietf.org/html/rfc3986>` and is provided for convenience.
bool strip_matching_host_port = 39;
}
message Rds {

Loading…
Cancel
Save