@@ -280,6 +280,14 @@ message RouteMatch {
280280 // the request with the same values (or based on presence if the value field
281281 // is not in the config).
282282 repeated HeaderMatcher headers = 6 ;
283+
284+ // [#not-implemented-hide:]
285+ // Specifies a set of URL query parameters on which the route should
286+ // match. The router will check the query string from the *path* header
287+ // against all the specified query parameters. If the number of specified
288+ // query parameters is nonzero, they all must match the *path* header's
289+ // query string for a match to occur.
290+ repeated QueryParameterMatcher query_parameters = 7 ;
283291}
284292
285293message CorsPolicy {
@@ -802,3 +810,22 @@ message HeaderMatcher {
802810 // * The regex *\d{3}* does not match the value *123.456*
803811 google.protobuf.BoolValue regex = 3 ;
804812}
813+
814+ // Query parameter matching treats the query string of a request's :path header
815+ // as an ampersand-separated list of keys and/or key=value elements.
816+ message QueryParameterMatcher {
817+ // Specifies the name of a key that must be present in the requested
818+ // *path*'s query string.
819+ string name = 1 [(validate.rules ) .string.min_bytes = 1 ];
820+
821+ // Specifies the value of the key. If the value is absent, a request
822+ // that contains the key in its query string will match, whether the
823+ // key appears with a value (e.g., "?debug=true") or not (e.g., "?debug")
824+ string value = 3 ;
825+
826+ // Specifies whether the query parameter value is a regular expression.
827+ // Defaults to false. The entire query parameter value (i.e., the part to
828+ // the right of the equals sign in "key=value") must match the regex.
829+ // E.g., the regex "\d+$" will match "123" but not "a123" or "123a".
830+ google.protobuf.BoolValue regex = 4 ;
831+ }
0 commit comments