Forum Discussion
Irule to forward to pool AND block uri
Hi,
I have iapp used for multiple fqdn and pool I have an irule for host and pool but I need to add irule for a specific host to autorize only one uri data group list Probleme is this irule apply to all fqdn
Irule one :
when HTTP_REQUEST { if { [HTTP::host] eq "1.toto.com" } { pool pool_https_toto1 } elseif { [HTTP::host] eq "2.toto.com" } { pool pool_https_toto2 } }
Irule two :
when HTTP_REQUEST { if { [ class match [string tolower [HTTP::uri]] contains allowed_uris ] } { return else { drop } } }
I need to apply the second irule only on specific host, how i can do this ?
2 Replies
- Vijay_E
Cirrus
If you want to make a decision only if a specific pool member is selected, you can utilize LB_SELECTED event in order to match on the specific pool member before making further decision based on URI.
- Stephane_Viau
Nimbostratus
Not sure if I understand correctly, but if you want the second iRule to be effective only for a specific hostname, why don't you just add the same "if" condition as you did in the first iRule?
if { [HTTP::host] eq "1.toto.com" } { if { [ class match [string tolower [HTTP::uri]]...etc } }
The LB_SELECTED code above applies to a different scenario but I think there's a bit of confusion understanding what you are trying to do.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com