-
Notifications
You must be signed in to change notification settings - Fork 10
Route & Header Matching
Anker Tsaur edited this page Apr 19, 2023
·
2 revisions
prefix: string
regex: string
method: string
headers: []HeaderMatch
(string, optional oneof) Specifies type of match to be performed on url path
-
prefix: Prefix matching
:path
header. The:path
header contains entire url path including the query params. -
regex: Regex matching entire
:path
header. The regex must constructed to include query parameters. Regex string must adhere to documented syntax
If neither prefix
nor regex
is supplied then match is performed on /
prefix
(string, optional oneof)
- method: Request must match supplied value like GET, POST etc.
([]HeaderMatch, optional) List of http headers to match
key: string # header name
eq: string # equals
sw: string # starts-with
ew: string # ends-with
co: string # contains
lk: string # like
pr: bool # present (unary)
neq: string # not equals
nsw: string # not starts-with
new: string # not ends-with
nco: string # not contains
nlk: string # not like
npr: bool # not present (unary)
(string, required) Header name
(oneof required oneof) Comparison operator. For binary operators, the operator value indicates the right hand operand and should be a raw string.
The supported operators are
- eq/neq: Exact string match
- sw/nsw: String prefix match
- ew/new: String suffix match
- co/nco: Substring match
- lk/nlk: Regex match. Regex syntax is documented here
-
pr/npr: Unary operator. Indicates if key is present or not. Only
true
value is used. Usepr
to test presence andnpr
to test non presence.