Proxy rule expressions
Use proxy rule expressions to make configuration rules more granular in scope by specifying information within the rule. Proxy rule expressions are assigned to a proxy virtual host. When a request is handled by the proxy virtual host, the proxy rule expressions associated with that proxy virtual host are evaluated. If any of the proxy rule expressions evaluates to true, then all the proxy actions specified in the proxy rule expression configuration are performed.
Proxy rule expressions have operands and operators created and managed by an administrator. With operands, we can configure proxy rule expressions based on the following criteria:
- cell
- application
- module
- uri
- urigroup
Operands are combined with operators to define the proxy rule expressions. Operators can be applied with words or symbols.
Word Symbol AND && OR ||
Example 1
In the following example, the expression evaluates to true if the target cell name is mycell. Otherwise, the expression evaluates to false.
cell=mycell
Example 2
In the following example, the expression evaluates to true if the target cell name is mycell, and the application name is myapp. Otherwise, the expression evaluates to false.
cell=mycell AND application="myapp"
Example 3
In the following example, the expression evaluates to true if the target cell name is mycell, and the target application name is myapp1 or myapp2. Otherwise, the expression evaluates to false.
cell=mycell && (application="myapp1" || application="myapp2")
Example 4
In the following example, the expression evaluates to true if the target cell name is mycell, and the target application is not named myapp Otherwise, the expression evaluates to false.
cell=mycell AND application!=myapp
Example 5
In the following example, the expression evaluates to true if the request URI matches the pattern /proxy1/*. Otherwise, the expression evaluates to false.
uri="/proxy1/*"
Proxy rule expressions collection Proxy rule expression settings Proxy server actions