Forum Discussion
anujl_5566
Nov 02, 2011Nimbostratus
Persistence Cookie iRule not working as desired
when HTTP_REQUEST {
if { [HTTP::path] equals "/api/v1/sendpinonceoff" } {
HTTP::path /sendpinonceoff
pool MM-MEPD
persist none
}
if { [HTTP::path] equals "/api/v1/verifypinonceoff" } {
HTTP::path /verifypinonceoff
pool MM-MEPD
persist none
}
if { [HTTP::path] equals "/api/v1/processrefund_status" } {
HTTP::path /processrefund_status
pool MM-MEPD_Deliver
persist none
}
if { [HTTP::path] equals "/api/v1/processrefund" } {
HTTP::path /processrefund/
pool MM-MEPD_Deliver
persist none
}
if { [HTTP::path] equals "/api/v1/sendpinajax" } {
pool MM-MEP
persist cookie insert "MM-MEP-SENDPIN"
}
}
Now when I go to the url /api/v1/sendpinajax, I see the cookie MM-MEP-SENDPIN. The problem is I also see the default persistence cookie set for the Virtual Server. Is this desired behavior?
- nitassEmployeethis is mine. is there any different?
[root@iris:Active] config b virtual bar list virtual bar { snat automap pool foo destination 172.28.17.33:http ip protocol tcp rules myrule persist cookie profiles { http {} tcp {} } } [root@iris:Active] config b pool foo list pool foo { members 10.10.70.110:http {} } [root@iris:Active] config b profile cookie list profile persist cookie { mode cookie mirror disable cookie mode insert cookie name none cookie expiration immediate cookie hash offset 0 cookie hash length 0 rule none } [root@iris:Active] config b rule myrule list rule myrule { when HTTP_REQUEST { persist cookie insert "cookieirule" } } [root@iris:Active] config curl -I http://172.28.17.33/ HTTP/1.1 200 OK Date: Wed, 02 Nov 2011 08:50:42 GMT Server: Apache/2.0.59 (rPath) Last-Modified: Sat, 11 Jun 2011 00:31:47 GMT ETag: "667a-67-cfb682c0" Accept-Ranges: bytes Content-Length: 103 Vary: Accept-Encoding Content-Type: text/html; charset=UTF-8 Set-Cookie: cookieirule=1850083850.20480.0000; expires=Wed, 02-Nov-2011 17:43:31 GMT; path=/
- anujl_5566Nimbostratusnitass- you dot have multiple pools like I have in the iRule. But I understand that you have a default persistence cookie profile which does not have unique name and then you specify a cookie name in iRule. According to my situation you should be seeing 2 cookies, one which has the default cookie name BigipServerpool and the second cookieirule. But you are seeing only one, which is desired.
Hi,
- nitassEmployeeDo you see nay explicit error in my iRule? i don't see any suspicious in the irule. have you tried Kurt's suggestion? how is it?
- anujl_5566Nimbostratusnitass- this is what I see in curl
The requested URL /api/v1/sendpinajax was not found on this server.
- I do not think persist none will make the browser drop cookies.
- anujl_5566NimbostratusKurt, this is the current iRule
- anujl_5566NimbostratusIn the irule that I have posted above do not consider this part,
- To add persist cookie command in the iRule I need to add a default cookie profile on Virtual server.
- anujl_5566NimbostratusKurt,
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