Forum Discussion
Need an Irule
I will change the user input to lower case since the if statement is case sensitive. Also make sure you create the data group. To create the data group do the following: * go to local traffic/Irules/data group List * Click on Create * name:data_group1 * type: Address Under records Address: 10.1.1.5/32 <--This is the IP that you want to allow value : 10.1.1.5/32 Click add and repeat to enter other workstation when you are done click finished
when HTTP_REQUEST {
set Vuri [ string tolower [HTTP::uri]] set Vheader [ string tolower [HTTP::host]]
if { $Vheader equals "www.xyz.com"} {
switch -glob $Vuri {
"/api/account/" {
if { ([class match [IP::client_addr] equal data_group1 ] )} then { pool pool_name }
else { reject }
}
"/api/admin/" {
if { ([class match [IP::client_addr] equal data_group1 ] )} then { pool pool_name }
else { reject }
}
default { pool pool_name }
}
}
}
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