
Chapter 4: Configuring the High-Level Network
4-68
Rule using the one of operator
A good use of the one of operator in a rule is when you have a class such as
that shown in Figure 4.38.
Figure 4.38 An example of a class
Given the above class, you could create a rule that uses the one of operator
to select a pool based on whether the value of the variable http_uri ends
with a member of the class images. Figure 4.39 shows this rule.
Figure 4.39 Example of a rule using the one of operator
Rules based on HTTP header insertion
You can create rules based on headers that an SSL Accelerator proxy has
inserted into HTTP requests. For examples of these types of rules, see
Inserting headers into HTTP requests, on page 4-95.
class images {
".gif"
".jpg"
".bmp"
}
rule myrule {
if ( http_uri ends_with one of images ) {
use ( image_pool )
}
else {
use ( dynamic_pool )
}
Komentarze do niniejszej Instrukcji