Forum Discussion
KingMeow_3883
Apr 03, 2015Altostratus
Hi Stephan,
I can confirm you're correct for 11.4.1 at least. I haven't built my iRule exactly but fiddled did a lot of testing. I can turn attributes like
HTTP::uri
into variables just by set x "HTTP::uri"
. then I can get the command HTTP::uri by $x
. Alternatively if I do [$x]
it returns the value of the HTTP uri.
I even did something like
when HTTP_REQUEST {
set a HTTP::header
set b "replace"
set c "host"
set d "new.host.header.value"
$a $b $c $d
}
And the last line actually replaced the host header.
I haven't been able to turn things like "starts_with" into variables though - every approach has resulted in a run time error but I think I've gotten around it by using
matches_glob
for all string matching and leaving it up to the user to enter the correct wildcards into the datagroup that feeds into the iRule.
I think this is pretty much solved but I'll build my iRule when I get a chance again and repost in a couple of days with an update.
I'm quite sure this is going to cut my iRule down to a third of its size at least. Thanks for your help again!