Forum Discussion
Andy_4937
Nimbostratus
Mar 05, 2009Agreement Banner prior to site access
As a first time poster, please forgive my noobness.
I'm trying to establish an agreement banner before allowing access to the web server. I have a fully functioning VS with a complete iRule....
Deb_Allen_18
Mar 05, 2009Historic F5 Account
i bleieve this condition:
if {not ([session add uie Agree "True"])}would always eval to True. Furthermore, it would always write to the same entry with a key of Agree.
Something like this instead, maybe? (assumes clients all have unique source IPs, and you're using an idle timeout of 5 min):
when HTTP_REQUEST {
if {[session lookup uie [IP::client_addr]] equals "BannerSent"}{
forward to the pool
pool webservers_pool
} else {
otherwise respond with the banner
HTTP::respond 200 content $::Banner
}
in both cases, update the timer on the session
session add uie [IP::client_addr] "BannerSent" 300
}
This will look to see if the client has already been sent the banner, if not will send it & set the session table entry, and update the timeout on the session table entry on every subsequent request.
Assuming the value of the content var includes some way to get back to the orignal request, that should work a bit better.
hth
/d
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
