Forum Discussion
shafiul
Nimbostratus
Jun 23, 2016iRule help
We need to configure iRule datagroup with a list of domains referenced by iRule that would allow web access (port 80 if it does matter) based on this list. If the host header does not match list, acc...
Yann_Desmarest
Cirrus
Jun 23, 2016Hi,
The datagroup name is missing and you are getting the User-Agent instead of the Host header, and a couple of syntax issues. Below a valid example. You need to have a string based datagroup named "MY_DATAGROUP_NAME" :
when HTTP_REQUEST {
if { [class match [string tolower [HTTP::header "Host"] equals MY_DATAGROUP_NAME] } {
pool mypoolname
} else {
you can use drop, reject or HTTP::respond command
reject
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects