Forum Discussion
jonathan_239725
Nimbostratus
Jan 19, 2017Trigger Once per session for specific client iRule
Good evening all,
I am looking for a way to do a "one time" trigger within an iRule.
Scenario:
User accesses site and if the html text "banana" is seen, log something, insert something...
IheartF5_45022
Nacreous
Jan 20, 2017All 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.....
IheartF5_45022
Nacreous
Jan 20, 2017Create a stream profile str_banana that looks for string 'banana', then attach an iRule as follows;-
when STREAM_MATCHED {
if {![HTTP::cookie exists 'banana']} {
Insert session cookie
HTTP::cookie insert name 'banana' value "1"
HTTP::cookie httponly 'banana' enable
log local0. "Banana seen for this session"
}
STREAM::disable
}
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