Forum Discussion
Beinhard_8950
Nov 22, 2011Nimbostratus
Redirect based on URL, Cookie problem.
Hi,
I have a VS that has it´s default pool.
The VS has cookie insert has persistence.
I have made a "redirection" based on a Uri with this Irule.
when HTTP_REQUEST {
if { [string match "*/xxxxxxxxx/yyyyyy*" [string map {. ""} [HTTP::request]]] } {
pool xxxyyyy
} else {
pool default
}
}
So the client flow is this:
The Client goes to the vs, authenticated and are logged in.
They have got the cookie (traffic flows to a node in default pool).
when they go to am speciell link at the site they will hit the irule and can then upload a document (pool xxxyyyy.
The problem is that when they "go back" (uploaded the file is done) to the default pool the cookie value has changed becasue they have visiting the pool "xxxyyyy so now they don´t hit the webserver they where on before.
Persistency has failed so the user is logged out.
How can I fix this?
ps. persistency on the pool xxxyyyy is not mandatory but can be an option.
Regards,
Beinhard
- nitassEmployeeSince persistence is not mandatory on pool xxxyyyy, why won't you use persist none when selecting pool xxxyyyy?
- Beinhard_8950Nimbostratushmm, but the Cookie is inherited from the VS, not pool, and I can´t removed it because i need the cookie when the client go back to the default pool.
- nitassEmployeee.g.
[root@ve1023:Active] config b virtual bar list virtual bar { snat automap pool foo destination 172.28.19.79:80 ip protocol 6 rules myrule persist cookie profiles { http {} tcp {} } } [root@ve1023:Active] config b rule myrule list rule myrule { when HTTP_REQUEST { if {[HTTP::uri] equals "/test"}{ pool foo2 } else { pool foo } } } [root@ve1023:Active] config curl -I http://172.28.19.79/ HTTP/1.1 200 OK Date: Tue, 22 Nov 2011 16:32:10 GMT Server: Apache/2.2.3 (CentOS) Last-Modified: Fri, 11 Nov 2011 14:48:14 GMT ETag: "4183e4-3e-9c564780" Accept-Ranges: bytes Content-Length: 62 Connection: close Content-Type: text/html; charset=UTF-8 Set-Cookie: BIGipServerfoo=1707657416.20480.0000; path=/ <<<<<<<<<< [root@ve1023:Active] config curl -I http://172.28.19.79/test HTTP/1.1 404 Not Found Date: Tue, 22 Nov 2011 16:31:31 GMT Server: Apache/2.2.3 (CentOS) Connection: close Content-Type: text/html; charset=iso-8859-1 Set-Cookie: BIGipServerfoo2=1724434632.20480.0000; path=/ <<<<<<<<<< [root@ve1023:Active] config b rule myrule list rule myrule { when HTTP_REQUEST { if {[HTTP::uri] equals "/test"}{ persist none <<<<<<<<<< pool foo2 } else { pool foo } } } [root@ve1023:Active] config curl -I http://172.28.19.79/ HTTP/1.1 200 OK Date: Tue, 22 Nov 2011 16:33:06 GMT Server: Apache/2.2.3 (CentOS) Last-Modified: Fri, 11 Nov 2011 14:48:14 GMT ETag: "4183e4-3e-9c564780" Accept-Ranges: bytes Content-Length: 62 Connection: close Content-Type: text/html; charset=UTF-8 Set-Cookie: BIGipServerfoo=1707657416.20480.0000; path=/ [root@ve1023:Active] config curl -I http://172.28.19.79/test HTTP/1.1 404 Not Found Date: Tue, 22 Nov 2011 16:32:17 GMT Server: Apache/2.2.3 (CentOS) Connection: close Content-Type: text/html; charset=iso-8859-1
- Beinhard_8950NimbostratusSo simple so good =)
- Beinhard_8950NimbostratusVerified now in test and yes, it's seems to work as expected =)
However, if I want to to maybe insert a cookie insert like this:
persist cookie insert xxxyyyy "0d 00:00:00"It seems that my test F5 was affected by the SOL11679 and 13069.I haven´t had the time to dig in to it yet but it seems that I didn´t got the session expire.Beinhard - nitassEmployeeIt seems that my test F5 was affected by the SOL11679 and 13069.doesn't the workaround work??
- Beinhard_8950NimbostratusI was a little bit stressed so when I did the cookie insert and saw that the cookie had a Timeout of 180 s is thought, wtf but after a little time I thought I was hitted by a bug and when I saw these two SOL everything cleared.
I verifed it today and it was OK, workarounds usually works.
Beinhard
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