Forum Discussion
nitass
Aug 05, 2014Employee
it 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=/;