Forum Discussion
rayden_75606
Nov 06, 2008Nimbostratus
I played around with your irule a little and had a little success with the following:
though I generally set this at the command prompt
example: bigpipe class valid_methods { \"CONNECT\" \"GET\" \"POST\" \"HEAD\" \"OPTIONS\" }
then set my call to it anywhere not needed to init in rule, but this is with your init in the rule
when RULE_INIT {
set sec_http_versions [ "0.9" "1.0" "1.1" ]
set sec_http_methods [ "GET" "POST" "HEAD"]
}
when HTTP_REQUEST {
if { not [matchclass [HTTP::version] equals $::sec_http_versions ] } {
reject
} elseif { not [matchclass [string toupper [HTTP::method]] equals $::sec_http_methods] } {
reject
}
(rest of the iRule goes here)
}