http: add support for skipping any port from host header (#14491)

Signed-off-by: Rama Chavali <rama.rao@salesforce.com>

Mirrored from https://github.com/envoyproxy/envoy @ e80b8eec292382f28ac0428229ce165d12ddeb13
pull/624/head
data-plane-api(Azure Pipelines) 4 years ago
parent 82bf91926f
commit a44451384a
  1. 17
      envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto
  2. 28
      envoy/extensions/filters/network/http_connection_manager/v4alpha/http_connection_manager.proto

@ -35,7 +35,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: 42]
// [#next-free-field: 43]
message HttpConnectionManager {
option (udpa.annotations.versioning).previous_message_type =
"envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager";
@ -551,7 +551,20 @@ message HttpConnectionManager {
// 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;
// Only one of `strip_matching_host_port` or `strip_any_host_port` can be set.
bool strip_matching_host_port = 39
[(udpa.annotations.field_migrate).oneof_promotion = "strip_port_mode"];
oneof strip_port_mode {
// 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 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.
// Only one of `strip_matching_host_port` or `strip_any_host_port` can be set.
bool strip_any_host_port = 42;
}
// Governs Envoy's behavior when receiving invalid HTTP from downstream.
// If this option is false (default), Envoy will err on the conservative side handling HTTP

@ -34,7 +34,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: 42]
// [#next-free-field: 43]
message HttpConnectionManager {
option (udpa.annotations.versioning).previous_message_type =
"envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager";
@ -544,13 +544,25 @@ message HttpConnectionManager {
// coded in Envoy, the response content type is plain text.
LocalReplyConfig local_reply_config = 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;
oneof strip_port_mode {
// 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.
// Only one of `strip_matching_host_port` or `strip_any_host_port` can be set.
bool strip_matching_host_port = 39;
// 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 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.
// Only one of `strip_matching_host_port` or `strip_any_host_port` can be set.
bool strip_any_host_port = 42;
}
// Governs Envoy's behavior when receiving invalid HTTP from downstream.
// If this option is false (default), Envoy will err on the conservative side handling HTTP

Loading…
Cancel
Save