Configure named advanced policy expressions
-
ThisExpression:
http.req.body(100).contains("this") -
ThatExpression:
http.req.body(100).contains("that")
Example 1: Simple Named Expression as a Prefix
HTTP.REQ.BODY(1000)
Example 2: Compound named expression as a prefix
add policy expression basic_header_value "HTTP.REQ.USER.NAME + \":\" + HTTP.REQ.USER.PASSWD"
add rewrite action insert_b64encoded_authorization insert_http_header authorization '"Basic " + basic_header_value.b64encode'
Configure a named Advanced policy expression by using the CLI
- add policy expression \<name\>\<value\>
- show policy expression \<name\>
> add policy expression myExp "http.req.body(100).contains(\"the other\")"
Done
> show policy expression myExp
1) Name: myExp Expr: "http.req.body(100).contains("the other")" Hits: 0 Type : ADVANCED
Done
Configure a named expression by using the GUI
-
In the navigation pane, expand AppExpert, and then click Expressions.
-
Click Advanced Expressions.
-
Click Add.
-
Enter a name and a description for the expression.
-
Configure the expression by using the process described in Configure advanced policy expression. A message in the status bar indicates that the policy expression is configured successfully.