Forum Discussion
JP_G
Oct 21, 2020Altostratus
Hello All,
I am looking to refine the rule proposed above just a bit and came up with the following:
---
when HTTP_REQUEST {
if { [HTTP::header exists X-APP-WHITELIST] and [HTTP::header X-APP-WHITELIST] equals "8" or [string tolower [HTTP::header User-Agent]] contains "googlebot" } {
pool A
else {
pool default
}
}
---
We are looking for the detail: "X-APP-WHITELIST" in the header equal to "8" OR if the user-agent has, "googlebot" discovered in the header. Not looking at the XFF part of the header. The, '&&' appears to be a logical AND in which both conditions have to be true. We are looking for one or the other; does not have to be both.
Does this look to be simpler?
Thank you all for your replies.