request_matchers.proto

Package : networking.mesh.gloo.solo.io

Top

request_matchers.proto

Table of Contents

DeprecatedHttpMatcher

Specify HTTP request level match criteria. All specified conditions must be satisfied for a match to occur. DEPRECATED: use HttpMatcher

Field Type Label Description
name string The name assigned to a match. The match's name will be concatenated with the parent route's name and will be logged in the access logs for requests matching this route.
prefix string If specified, the targeted path must begin with the prefix. DEPRECATED. Use uri.prefix instead
exact string If specified, the targeted path must exactly match the value. DEPRECATED. Use uri.exact instead
regex string If specified, the targeted path must match the regex. DEPRECATED. Use uri.regex instead
uri common.mesh.gloo.solo.io.StringMatch Specify match criteria against the targeted path.
headers []networking.mesh.gloo.solo.io.HeaderMatcher repeated Specify a set of headers which requests must match in entirety (all headers must match).
queryParameters []networking.mesh.gloo.solo.io.DeprecatedHttpMatcher.QueryParameterMatcher repeated Specify a set of URL query parameters which requests must match in entirety (all query params must match).
method string Specify an HTTP method to match against.

DeprecatedHttpMatcher.QueryParameterMatcher

Specify match criteria against the target URL's query parameters.

Field Type Label Description
name string Specify the name of a key that must be present in the requested path's query string.
value string Specify the value of the query parameter keyed on name.
regex bool If true, treat value as a regular expression.

HeaderMatcher

Describes a matcher against HTTP request headers.

Field Type Label Description
name string Specify the name of the header in the request.
value string Specify the value of the header. If the value is absent a request that has the name header will match, regardless of the header’s value.
regex bool Specify whether the header value should be treated as regex.
invertMatch bool If set to true, the result of the match will be inverted. Defaults to false.
Examples:
- name=foo, invert_match=true: matches if no header named foo is present - name=foo, value=bar, invert_match=true: matches if no header named foo with value bar is present - name=foo, value=\d{3}, regex=true, invert_match=true: matches if no header named foo with a value consisting of three integers is present.

HttpMatcher

Specify HTTP request level match criteria. All specified conditions must be satisfied for a match to occur.

Field Type Label Description
name string The name assigned to a match. The match's name will be concatenated with the parent route's name and will be logged in the access logs for requests matching this route.
uri common.mesh.gloo.solo.io.StringMatch Specify match criteria against the targeted path.
headers []networking.mesh.gloo.solo.io.HeaderMatcher repeated Specify a set of headers which requests must match in entirety (all headers must match).
queryParameters []networking.mesh.gloo.solo.io.HttpMatcher.QueryParameterMatcher repeated Specify a set of URL query parameters which requests must match in entirety (all query params must match).
method string Specify an HTTP method to match against.

HttpMatcher.QueryParameterMatcher

Specify match criteria against the target URL's query parameters.

Field Type Label Description
name string Specify the name of a key that must be present in the requested path's query string.
value string Specify the value of the query parameter keyed on name.
regex bool If true, treat value as a regular expression.

StatusCodeMatcher

Describes a matcher against HTTP response status codes.

Field Type Label Description
value uint32 The status code value to match against.
comparator networking.mesh.gloo.solo.io.StatusCodeMatcher.Comparator The comparison type used for matching.

StatusCodeMatcher.Comparator

Name Number Description
EQ 0 Strict equality.
GE 1 Greater than or equal to.
LE 2 Less than or equal to.