{ "timeout": 1000, "default_policy": "allow", "cache": true, "expressions": [ { "policy": "deny", "infix_tokens": [ { "type": "parenthesis", "value": "open" }, { "type": "predicate", "condition": "equal", "protocol": [ "HTTP", "HTTPS" ], "direction": "in" }, { "type": "operator", "value": "or" }, { "type": "predicate", "condition": "contains", "http_request_url": [ ".php" ] }, { "type": "parenthesis", "value": "close" }, { "type": "operator", "value": "and" }, { "type": "predicate", "condition": "equal", "country": [ "US" ] } ] }, { "policy": "allow", "infix_tokens": [ { "type": "predicate", "condition": "contains", "http_request_body": [ "Hello" ] }, { "type": "operator", "value": "or" }, { "type": "predicate", "condition": "greater_equal", "http_request_header": { "From": [ "foo@bar.com", "bar@foo.com", "foo@baz.com" ] } }, { "type": "operator", "value": "or" }, { "type": "predicate", "condition": "equal", "http_request_rate_limit": { "limit": 5, "period": 30, "urls": [ "/account", "/some/other/path" ] } } ] }, { "policy": "deny", "infix_tokens": [ { "type": "predicate", "condition": "lower_than", "http_response_code": [ 205, 206 ] }, { "type": "operator", "value": "or" }, { "type": "predicate", "condition": "not_starts_with", "http_request_query": { "Name": [ "giuliano", "giacomo" ] } }, { "type": "operator", "value": "or" }, { "type": "predicate", "condition": "ends_with", "http_response_size": [ 100, 200, 300 ] }, { "type": "operator", "value": "or" }, { "type": "predicate", "condition": "contains", "source_ip": [ "alias_name" ] } ] } ] }