Forum Discussion
mcallisterdu_59
Nimbostratus
Mar 20, 2017How to read (get) cookie expiry value?
Hi- the iRule documentation specifies that, on HTTP_RESPONSE, one can get (or set) the value of a cookie expiry.
https://devcentral.f5.com/wiki/iRules.HTTP__cookie.ashx
I'm essentially trying to ...
Jeff_Maddox_394
Mar 22, 2017Historic F5 Account
Make sure when testing, all cookies are cleared. The expiry will appear in the server response that initially sets the cookie, but should not be in subsequent responses. Make sure in the testing, that particular response is being captured.
I am able to get this to work on a test page with the following:
when HTTP_RESPONSE {
if {[HTTP::cookie exists "NID"] } {
set expires [HTTP::cookie expires "NID"]
log local0. "$expires"
}
}
Log output:
bigip1 info tmm[10062]: Rule /Common/cookie_log : 1506041117Help 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
