PGI_28560
Nov 14, 2011Nimbostratus
Drop Traffic based on HTTP Header
This is my first entry into the world in iRules, however I don't have much programming expierence, so I just wanted to run this by the community.
I am looking to make an iRule based on if a certain header exists. For example, if the header "t-shirt" exists, send the connection to the "pants" pool. If the header does not exist, drop the connection.
when HTTP_REQUEST {
if { [HTTP::header exists t-shirt] } {
pool pants
} else {
discard
}
}
Above is what I came up with, so I am not sure if that looks right. It seemed too easy.
Thanks for any help with this matter!