Forum Discussion
hooleylist
Sep 17, 2009Cirrostratus
This line was just for debugging of all requests:
log local0. "[IP::client_addr]:[TCP::local_port]: Request to [HTTP::uri] with dg: $::ips_internal"
If you want to use a switch statement you can use something like this:
when HTTP_REQUEST {
switch -glob [HTTP::uri] {
"*Test.jsp*" -
"*Stats.jsp*" {
if {not [matchclass [IP::client_addr] equals $::ips_internal]} {
log local0. "[IP::client_addr]:[TCP::local_port]: Matched IP check. Discarding request to [HTTP::uri]"
discard
}
}
}
}
Note the use of the asterisks for wildcard (glob) matching.
Aaron