Select different security policy depending on host name
Is it possible to create and apply a Local Traffic Policy or iRule on a Virtual server that selects different security policies (ASM), depending on the host name of the http request ?
I know one can forward the traffic to other Virtual Servers with different policies applied, but I wonder if it is possible to accomplish the same on the one Virtual Server together with iRules or traffic policies.
Example, when traffic reaches a standard Virtual Server:
When target host name is hostname1.com, iRule or local traffic policies applies ASM Security Policy "hostname1_SP" on the Virtual Server
When target host name is hostname2.com, iRule or local traffic policies applies ASM Security Policy "hostname2_SP" on the Virtual Server
Create a Local Traffic Policy with a custom rule that filters on host name and then sends requests to a specific asm policy based on that criterion. Here's the GUI in 14.1: