diff --git a/envoy/api/v2/route/route.proto b/envoy/api/v2/route/route.proto index 8244b013..c28500e6 100644 --- a/envoy/api/v2/route/route.proto +++ b/envoy/api/v2/route/route.proto @@ -727,6 +727,8 @@ message RouteAction { oneof host_rewrite_specifier { // Indicates that during forwarding, the host header will be swapped with // this value. + // + // [#next-major-version: host_rewrite_literal] string host_rewrite = 6; // Indicates that during forwarding, the host header will be swapped with @@ -744,6 +746,8 @@ message RouteAction { // // Pay attention to the potential security implications of using this option. Provided header // must come from trusted source. + // + // [#next-major-version: host_rewrite_header] string auto_host_rewrite_header = 29; } diff --git a/envoy/api/v3alpha/route/route.proto b/envoy/api/v3alpha/route/route.proto index 8e0513d2..68c0911f 100644 --- a/envoy/api/v3alpha/route/route.proto +++ b/envoy/api/v3alpha/route/route.proto @@ -667,6 +667,8 @@ message RouteAction { oneof host_rewrite_specifier { // Indicates that during forwarding, the host header will be swapped with // this value. + // + // [#next-major-version: host_rewrite_literal] string host_rewrite = 6; // Indicates that during forwarding, the host header will be swapped with @@ -684,6 +686,8 @@ message RouteAction { // // Pay attention to the potential security implications of using this option. Provided header // must come from trusted source. + // + // [#next-major-version: host_rewrite_header] string auto_host_rewrite_header = 29; } diff --git a/envoy/config/filter/http/dynamic_forward_proxy/v2alpha/dynamic_forward_proxy.proto b/envoy/config/filter/http/dynamic_forward_proxy/v2alpha/dynamic_forward_proxy.proto index 04fe1799..dbe548c3 100644 --- a/envoy/config/filter/http/dynamic_forward_proxy/v2alpha/dynamic_forward_proxy.proto +++ b/envoy/config/filter/http/dynamic_forward_proxy/v2alpha/dynamic_forward_proxy.proto @@ -24,8 +24,31 @@ message FilterConfig { // Per route Configuration for the dynamic forward proxy HTTP filter. message PerRouteConfig { - // Indicates that before DNS lookup, the host header will be swapped with - // this value. If not set or empty, the original host header value - // will be used and no rewrite will happen. - string host_rewrite = 1; + oneof host_rewrite_specifier { + // Indicates that before DNS lookup, the host header will be swapped with + // this value. If not set or empty, the original host header value + // will be used and no rewrite will happen. + // + // Note: this rewrite affects both DNS lookup and host header forwarding. However, this + // option shouldn't be used with + // :ref:`HCM host rewrite ` given that the + // value set here would be used for DNS lookups whereas the value set in the HCM would be used + // for host header forwarding which is not the desired outcome. + // + // [#next-major-version: host_rewrite_literal] + string host_rewrite = 1; + + // Indicates that before DNS lookup, the host header will be swapped with + // the value of this header. If not set or empty, the original host header + // value will be used and no rewrite will happen. + // + // Note: this rewrite affects both DNS lookup and host header forwarding. However, this + // option shouldn't be used with + // :ref:`HCM host rewrite header ` + // given that the value set here would be used for DNS lookups whereas the value set in the HCM + // would be used for host header forwarding which is not the desired outcome. + // + // [#next-major-version: host_rewrite_header] + string auto_host_rewrite_header = 2; + } } diff --git a/envoy/config/filter/http/dynamic_forward_proxy/v3alpha/dynamic_forward_proxy.proto b/envoy/config/filter/http/dynamic_forward_proxy/v3alpha/dynamic_forward_proxy.proto index 8ccb59dd..d63094f3 100644 --- a/envoy/config/filter/http/dynamic_forward_proxy/v3alpha/dynamic_forward_proxy.proto +++ b/envoy/config/filter/http/dynamic_forward_proxy/v3alpha/dynamic_forward_proxy.proto @@ -24,8 +24,32 @@ message FilterConfig { // Per route Configuration for the dynamic forward proxy HTTP filter. message PerRouteConfig { - // Indicates that before DNS lookup, the host header will be swapped with - // this value. If not set or empty, the original host header value - // will be used and no rewrite will happen. - string host_rewrite = 1; + oneof host_rewrite_specifier { + // Indicates that before DNS lookup, the host header will be swapped with + // this value. If not set or empty, the original host header value + // will be used and no rewrite will happen. + // + // Note: this rewrite affects both DNS lookup and host header forwarding. However, this + // option shouldn't be used with + // :ref:`HCM host rewrite ` given + // that the value set here would be used for DNS lookups whereas the value set in the HCM would + // be used for host header forwarding which is not the desired outcome. + // + // [#next-major-version: host_rewrite_literal] + string host_rewrite = 1; + + // Indicates that before DNS lookup, the host header will be swapped with + // the value of this header. If not set or empty, the original host header + // value will be used and no rewrite will happen. + // + // Note: this rewrite affects both DNS lookup and host header forwarding. However, this + // option shouldn't be used with + // :ref:`HCM host rewrite header + // ` given that the + // value set here would be used for DNS lookups whereas the value set in the HCM would be used + // for host header forwarding which is not the desired outcome. + // + // [#next-major-version: host_rewrite_header] + string auto_host_rewrite_header = 2; + } }