Forum Discussion
Trigger Once per session for specific client iRule
All variables have scope of TCP session. Or do you mean users browser session? You could add in a session cookie to help you with that.
Also when you say 'html text "banana"' do you mean if you see the word 'banana' in the content of an HTTP response?
A bit more info and we can give you some code to illustrate.....
Sorry if my requirements weren't clear. My use case wasn't the greatest. I'm simply trying to track within the Big-IP when a specific criteria is met, carry out action X and don't do it again for the duration of the users session. Unfortunately setting a cookie on the clients end is not an option. Doing further research, would setting the value in the session table work?
Something like this
when HTTP_REQUEST {
if { [table -subtable lookup [IP::client_addr] [HTTP::host]] !=""} {
return
}elseif { ([HTTP::header value host] contains "web.company.com")} {
log local0. "Criteria met for [IP::client_addr] for [HTTP::header value host] in request"
table set -subtable [IP::client_addr] [HTTP::host]
}
}
when CLIENT_CLOSED {
table delete -subtable [IP::client_addr]
}
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