Forum Discussion
pedinopa_170325
Nimbostratus
Feb 12, 2018fun with irule
I am working on an excersise to insert random quotes into http headers. I have an irule that uses data groups and if your subnet is in the DG a header with a specific quote is inserted, if your IP s...
Only1masterbla1
Cirrus
Feb 12, 2018Slightly modified. You may try this:
Codewhen HTTP_REQUEST {
set random [ expr {int(rand()*2)}] log local0. "random = $random" set member [class match -value $random equals dg] log local0. "member = $member" }
--
dg integer type:
0: quote0
1: quote1
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