Forum Discussion
Hi David, if you are using a version prior to 11.4, you can use HTTP CLASSES, where you can deny everything except the HOST AND URI. In version 11.4 and after, CPM 5Central Policy Matching) can be used for this.
But if you want to stay with an iRule approach, your iRule looks okay, except that you need to use a compliant call for the DATAGROUP you are using (if not, you will demote CMP). instead of $::Pool... you need to use the DATAGROUP Name directly : PoolOfAllowedAddresses
I would also recommend using the "string tolower" command, to avoid some lowercase/uppercase issues.
What do you want to do if multiple requests are carried by the same connection ? in the else, i think that "HTTP::respond" command would have been better.
If the HTML page you are allowing is composed of multiple objects (images, ...), then you will have to allow them also.