Forum Discussion
Cookie Expiration modification not making it to the browser
Hey guys we have a simple irule that is suppose to modify a cookie that we have in the browser. The cookie looks to get modified from the LTM side but that cookie change never makes it back to the browser.
Ideally we want the cookie to expire at end of session (when browser is closed)
connection goes through a VIP that has SSL offloading
Here is an example of the irule
when HTTP_RESPONSE {
if {$::my_host_header eq "subdomain.domain.com"} {
set cookies [HTTP::cookie names]
foreach aCookie $cookies {
if {$aCookie eq "Portal"} {
log local0. "[IP::client_addr]:[TCP::client_port]: Before Set-Cookie: [HTTP::header values Set-Cookie]"
#HTTP::cookie sanitize $aCookie path|secure|samesite|priority|maxage|expires
HTTP::cookie expires $aCookie 1 absolute
#HTTP::cookie remove $aCookie
#HTTP::cookie attribute $aCookie value "expires" "Thu, 01-Jan-1970 00:00:00 GMT"
#HTTP::cookie maxage $aCookie 01-Jan-1970
log local0. "[IP::client_addr]:[TCP::client_port]: After Set-Cookie: [HTTP::header values Set-Cookie]"
}elseif {$aCookie eq "Portal2"} {
log local0. "[IP::client_addr]:[TCP::client_port]: Portal 2 Found: [HTTP::header values Set-Cookie]"
}
}
}
}
Here is the LTM Logs
Rule /Common/DS-Cookie-iRule <HTTP_RESPONSE>: 10.10.45.xx:51571: After Set-Cookie: {Portal=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; samesite=lax} {Portal=CfDJ8DxA
I attached the browser, it isnt edited =(
Recent Discussions
Related Content
* 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