Forum Discussion
Daniel_Tremmel
Altostratus
Jun 04, 2014APM iRule Event: insert Cookie after Logon Page
Hi all,
following situation: when a user wants to access an application server, the user has to authenticate via Active Directory. Then a cookie with the username and a random number will be added ...
kunjan
Nimbostratus
Jun 06, 2014You may need both, one to insert the cookie to the application server and the other to set the cookie back to the client browser. And some logic avoid the repeat.
when HTTP_REQUEST {
set flag 0
if { [HTTP::cookie MyCookie] ne "" }{
set flag 1
}
}
when ACCESS_ACL_ALLOWED {
if { $flag eq 0 }{
HTTP::cookie insert name "MyCookie" value "MyValue" path "/"
}
}
when HTTP_RESPONSE {
if { $flag eq 0 }{
HTTP::header insert "Set-Cookie" "MyCookie=MyValue;path=/"
}
unset flag
}
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
