Forum Discussion
Chris_FP
Cirrus
Aug 04, 2014iRule adding extra time to HTTP::cookie expires <cookiename> 1200 relative command
We have an iRule which adds a version 0 cookie (suffice to say it has to be version 0 due to browser versions...) and also performs a HTTP::cookie expires 1200 relative.
However when I use fire...
nitass
Employee
Aug 05, 2014it seems okay here. i am using 11.5.1. sgt is gmt+8.
// HTTP::cookie expires test 1 relative
config
root@(B6900-R69-S40)(cfg-sync Standalone)(Active)(/Common)(tmos) list ltm virtual bar
ltm virtual bar {
destination 100.100.100.41:80
ip-protocol tcp
mask 255.255.255.255
pool foo
profiles {
http { }
tcp { }
}
rules {
qux
}
source 0.0.0.0/0
source-address-translation {
type automap
}
vs-index 2
}
root@(B6900-R69-S40)(cfg-sync Standalone)(Active)(/Common)(tmos) list ltm rule qux
ltm rule qux {
when HTTP_RESPONSE {
HTTP::cookie insert name test value 1234 path / version 0
HTTP::cookie expires test 1 relative
}
}
test
[root@client3 ~] date; curl -I http://100.100.100.41
Tue Aug 5 15:41:01 SGT 2014
HTTP/1.1 200 OK
Date: Tue, 05 Aug 2014 07:28:45 GMT
Server: Apache/2.2.3 (CentOS)
Last-Modified: Sun, 09 Feb 2014 08:39:51 GMT
ETag: "41879c-59-2a9c23c0"
Accept-Ranges: bytes
Content-Length: 89
Content-Type: text/html; charset=UTF-8
Set-Cookie: test=1234;expires=Tue, 05-Aug-2014 07:41:03 GMT;path=/;
// HTTP::cookie expires test 1300 relative
config
root@(B6900-R69-S40)(cfg-sync Standalone)(Active)(/Common)(tmos) list ltm rule qux
ltm rule qux {
when HTTP_RESPONSE {
HTTP::cookie insert name test value 1234 path / version 0
HTTP::cookie expires test 1300 relative
}
}
test
[root@client3 ~] date; curl -I http://100.100.100.41
Tue Aug 5 15:42:29 SGT 2014
HTTP/1.1 200 OK
Date: Tue, 05 Aug 2014 07:30:13 GMT
Server: Apache/2.2.3 (CentOS)
Last-Modified: Sun, 09 Feb 2014 08:39:51 GMT
ETag: "41879c-59-2a9c23c0"
Accept-Ranges: bytes
Content-Length: 89
Content-Type: text/html; charset=UTF-8
Set-Cookie: test=1234;expires=Tue, 05-Aug-2014 08:04:10 GMT;path=/;
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
