Forum Discussion
Kai_Wilke
Feb 11, 2019MVP
Hi Randy,
for Virtual Servers serving multiple Web Applications with dedicated ASM Policies, I'm going to assign a "DUMMY" ASM Policy (an ASM Policy which simply blocks everything).
Then I use the iRule below to switch between different ASM Policies based on a
$variable
or disable ASM as needed. The $variable
can be set
or even become computed at the time you select the pool.
when HTTP_REQUEST priority 999 {
if { ( [info exist ASM_Policy] )
and ( $ASM_Policy ne "" ) } then {
ASM::enable "/Common/$ASM_Policy"
} else {
ASM::disable
}
unset -nocomplain ASM_Policy
}
The important point is, that your have to assign a ASM Policy to your Virtual Server, before you can select a ASM Policy or selectively disable ASM at all. The opposite direction won't work...
Cheers, Kai