Router Expressions Language Reference for Kong Gateway
Kong router Expressions are designed as combinations of simple comparisons called “predicates”. All predicates have one of the following form:
Note: transformations only works on fields, it will not work on the value side of the predicate. This means you can not write:
Example:
Types
Available fields
Operator | Meaning |
---|---|
== | Equals |
!= | Not equals |
~ | Regex matching |
^= | Prefix matching |
=^ | Suffix matching |
in | Contains |
not in | Does not contain |
String transformations
Integer
Operator | Meaning |
---|---|
== | Equals |
!= | Not equals |
> | Greater than |
>= | Greater than or equal |
< | Less than |
<= | Less than or equal |
Boolean
Operator | Meaning |
---|---|
&& | Logical And |
|| | Logical Or |