Forum Discussion
Fluidetom_12222
Cirrus
Jan 07, 2014iRule to display one time warning message
Hey Guys,
We're going to decommission a website soon and we would like to use an iRule to display a warning message once per day to any user going on that website.
Is this something possible wit...
R_Eastman_13667
Dec 04, 2014Historic F5 Account
I just wanted to comment that this doesn't work, once the cookie expires, the cookie isn't reset:
when HTTP_REQUEST {
if { not ( [HTTP::cookie exists BANNERMESSAGE] ) } {
set expires [clock format [clock seconds] -format "%A, %d-%b-%Y 20:00:00"]
HTTP::respond 200 content "html banner content" "Set-Cookie" "BANNERMESSAGE=1; path=/; expires=$expires"
}
}
This does though:
when HTTP_REQUEST {
if { not ( [HTTP::cookie exists BANNERMESSAGE] ) } {
set expires "28800"
HTTP::respond 200 content "html banner content" "Set-Cookie" "BANNERMESSAGE=1; path=/; Max-Age=$expires"
}
}
Domai_23823
Nimbostratus
Apr 06, 2016Thank you ....worked like a charm.
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