diff --git a/BUILD b/BUILD index 52c4178f..1d438047 100644 --- a/BUILD +++ b/BUILD @@ -243,8 +243,8 @@ proto_library( "//envoy/extensions/network/dns_resolver/cares/v3:pkg", "//envoy/extensions/network/dns_resolver/getaddrinfo/v3:pkg", "//envoy/extensions/network/socket_interface/v3:pkg", - "//envoy/extensions/path/match/pattern_template/v3:pkg", - "//envoy/extensions/path/rewrite/pattern_template/v3:pkg", + "//envoy/extensions/path/match/uri_template/v3:pkg", + "//envoy/extensions/path/rewrite/uri_template/v3:pkg", "//envoy/extensions/quic/crypto_stream/v3:pkg", "//envoy/extensions/quic/proof_source/v3:pkg", "//envoy/extensions/rate_limit_descriptors/expr/v3:pkg", diff --git a/envoy/config/route/v3/route_components.proto b/envoy/config/route/v3/route_components.proto index e2c46a97..86a14434 100644 --- a/envoy/config/route/v3/route_components.proto +++ b/envoy/config/route/v3/route_components.proto @@ -572,8 +572,7 @@ message RouteMatch { // Expect the value to not contain ``?`` or ``#`` and not to end in ``/`` string path_separated_prefix = 14 [(validate.rules).string = {pattern: "^[^?#]+[^?#/]$"}]; - // [#not-implemented-hide:] - // [#comment: TODO(silverstar195): Hook into extension once added] + // [#extension-category: envoy.path.match] core.v3.TypedExtensionConfig path_match_policy = 15; } @@ -1030,9 +1029,9 @@ message RouteAction { // place the original path before rewrite into the :ref:`x-envoy-original-path // ` header. // - // Only one of :ref:`regex_rewrite ` or - // [#comment:TODO(silverstar194) add the following once implemented: :ref:`path_rewrite_policy `] - // :ref:`prefix_rewrite ` may be specified. + // Only one of :ref:`regex_rewrite ` + // :ref:`path_rewrite_policy `, + // or :ref:`prefix_rewrite ` may be specified. // // .. attention:: // @@ -1067,9 +1066,9 @@ message RouteAction { // before the rewrite into the :ref:`x-envoy-original-path // ` header. // - // Only one of :ref:`regex_rewrite ` - // or :ref:`prefix_rewrite ` - // [#comment:TODO(silverstar194) add the following once implemented: :ref:`path_rewrite_policy `] + // Only one of :ref:`regex_rewrite `, + // :ref:`prefix_rewrite `, or + // :ref:`path_rewrite_policy `] // may be specified. // // Examples using Google's `RE2 `_ engine: @@ -1090,8 +1089,7 @@ message RouteAction { // ``/aaa/yyy/bbb``. type.matcher.v3.RegexMatchAndSubstitute regex_rewrite = 32; - // [#not-implemented-hide:] - // [#comment: TODO(silverstar195): Hook into extension once added] + // [#extension-category: envoy.path.rewrite] core.v3.TypedExtensionConfig path_rewrite_policy = 41; oneof host_rewrite_specifier { diff --git a/envoy/extensions/path/match/pattern_template/v3/BUILD b/envoy/extensions/path/match/uri_template/v3/BUILD similarity index 100% rename from envoy/extensions/path/match/pattern_template/v3/BUILD rename to envoy/extensions/path/match/uri_template/v3/BUILD diff --git a/envoy/extensions/path/match/pattern_template/v3/pattern_template_match.proto b/envoy/extensions/path/match/uri_template/v3/uri_template_match.proto similarity index 80% rename from envoy/extensions/path/match/pattern_template/v3/pattern_template_match.proto rename to envoy/extensions/path/match/uri_template/v3/uri_template_match.proto index 24e6d96c..27579f5b 100644 --- a/envoy/extensions/path/match/pattern_template/v3/pattern_template_match.proto +++ b/envoy/extensions/path/match/uri_template/v3/uri_template_match.proto @@ -1,17 +1,18 @@ syntax = "proto3"; -package envoy.extensions.path.match.pattern_template.v3; +package envoy.extensions.path.match.uri_template.v3; import "udpa/annotations/status.proto"; import "validate/validate.proto"; -option java_package = "io.envoyproxy.envoy.extensions.path.match.pattern_template.v3"; -option java_outer_classname = "PatternTemplateMatchProto"; +option java_package = "io.envoyproxy.envoy.extensions.path.match.uri_template.v3"; +option java_outer_classname = "UriTemplateMatchProto"; option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/path/match/pattern_template/v3;pattern_templatev3"; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/path/match/uri_template/v3;uri_templatev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; -// [#protodoc-title: Pattern Template Match Config] +// [#protodoc-title: Uri Template Match Config] +// [#extension: envoy.path.match.uri_template.uri_template_matcher] // If specified, the route is a template match rule meaning that the // ``:path`` header (without the query string) must match the given @@ -38,7 +39,6 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // * ``/videos/{file}`` would match ``/videos/1080p5000_00001.m4s`` // // * ``/**.mpd`` would match ``/content/123/india/dash/55/manifest.mpd`` -// [#not-implemented-hide:] -message PatternTemplateMatchConfig { +message UriTemplateMatchConfig { string path_template = 1 [(validate.rules).string = {min_len: 1 max_len: 256}]; } diff --git a/envoy/extensions/path/rewrite/pattern_template/v3/BUILD b/envoy/extensions/path/rewrite/uri_template/v3/BUILD similarity index 100% rename from envoy/extensions/path/rewrite/pattern_template/v3/BUILD rename to envoy/extensions/path/rewrite/uri_template/v3/BUILD diff --git a/envoy/extensions/path/rewrite/pattern_template/v3/pattern_template_rewrite.proto b/envoy/extensions/path/rewrite/uri_template/v3/uri_template_rewrite.proto similarity index 87% rename from envoy/extensions/path/rewrite/pattern_template/v3/pattern_template_rewrite.proto rename to envoy/extensions/path/rewrite/uri_template/v3/uri_template_rewrite.proto index 2d5cebe8..0d35ca52 100644 --- a/envoy/extensions/path/rewrite/pattern_template/v3/pattern_template_rewrite.proto +++ b/envoy/extensions/path/rewrite/uri_template/v3/uri_template_rewrite.proto @@ -1,17 +1,18 @@ syntax = "proto3"; -package envoy.extensions.path.rewrite.pattern_template.v3; +package envoy.extensions.path.rewrite.uri_template.v3; import "udpa/annotations/status.proto"; import "validate/validate.proto"; -option java_package = "io.envoyproxy.envoy.extensions.path.rewrite.pattern_template.v3"; -option java_outer_classname = "PatternTemplateRewriteProto"; +option java_package = "io.envoyproxy.envoy.extensions.path.rewrite.uri_template.v3"; +option java_outer_classname = "UriTemplateRewriteProto"; option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/path/rewrite/pattern_template/v3;pattern_templatev3"; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/path/rewrite/uri_template/v3;uri_templatev3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; -// [#protodoc-title: Pattern Template Rewrite Config] +// [#protodoc-title: Uri Template Rewrite Config] +// [#extension: envoy.path.rewrite.uri_template.uri_template_rewriter] // Indicates that during forwarding, portions of the path that match the // pattern should be rewritten, even allowing the substitution of variables @@ -52,7 +53,6 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // * The path pattern ``/content/{format}/{lang}/{id}/{file}.vtt`` paired with a substitution // string of ``/{lang}/{format}/{file}.vtt`` would transform ``/content/hls/en-us/12345/en_193913.vtt`` // into ``/en-us/hls/en_193913.vtt``. -// [#not-implemented-hide:] -message PatternTemplateRewriteConfig { +message UriTemplateRewriteConfig { string path_template_rewrite = 1 [(validate.rules).string = {min_len: 1 max_len: 256}]; } diff --git a/versioning/BUILD b/versioning/BUILD index 69f18bb8..e8817753 100644 --- a/versioning/BUILD +++ b/versioning/BUILD @@ -186,8 +186,8 @@ proto_library( "//envoy/extensions/network/dns_resolver/cares/v3:pkg", "//envoy/extensions/network/dns_resolver/getaddrinfo/v3:pkg", "//envoy/extensions/network/socket_interface/v3:pkg", - "//envoy/extensions/path/match/pattern_template/v3:pkg", - "//envoy/extensions/path/rewrite/pattern_template/v3:pkg", + "//envoy/extensions/path/match/uri_template/v3:pkg", + "//envoy/extensions/path/rewrite/uri_template/v3:pkg", "//envoy/extensions/quic/crypto_stream/v3:pkg", "//envoy/extensions/quic/proof_source/v3:pkg", "//envoy/extensions/rate_limit_descriptors/expr/v3:pkg",