Bomart_316578
May 15, 2017Nimbostratus
Help with iRule HTTP_REQUEST syntax
Hello I try to rewrite this irule, before migrate to 10.2 to 12.x
when HTTP_CLASS_SELECTED {
if {[HTTP::class] eq "app_class" } {
pool POOL_1
}
}
`
Can you tell me please if it is a correct syntaxe
`when HTTP_REQUEST {
set policy [POLICY::names matched]
if {[POLICY::rules matched $policy] eq "app_class"}{
pool POOL_1
}
}
`
Or
`when HTTP_REQUEST {
if {[llength [POLICY::names matched]] > 0} {
if {[POLICY::rules matched $policy] eq "app_class"}{
pool POOL_1
}
}
}
To use policy_irule, i need to do something in ASM module ?
Thanks for all