Forum Discussion
Chris_Miller
Altostratus
Jun 26, 2010Multi-Domain Cookie Issue
Here's my situation...
I have a site, www.sample.com - configured with Akamai. The "origin" points to a VS on my LTM to which I have an iRule that sends users to different pools depending on a cookie value. I want to allow certain users to hit a specific pool but also want them to do so through Akamai. Since access to Akamai is wide open, I need them to hit my "origin" first and if they match my whitelist, I'll set a cookie and redirect them.
My initial assumption was that I'd do something like this:
1. A user hits origin.sample.com/1
2. My iRule inserts a cookie named "x" with the value of whatever is behind the / - in this case, a 1.
3. The iRule redirects them to www.sample.com (which goes through Akamai) and since they have a cookie value of 1, they'd go to the right pool.
Unfortunately, I forgot that the cookie "x" with value of "1" would be for the domain "origin.sample.com" and not "www.sample.com" so this likely wouldn't work.
Can anyone think of a better way to do this? Could I configure an iRule on my origin VS that looks at cookies from a specific domain?
11 Replies
- Chris_Miller
Altostratus
Hoolio - thanks a ton for all the help with this. I got it working using subdomains, specifying the cookie domain as .example.com, using HTTP::respond instead of HTTP::redirect, and by using Set-Cookie rather than HTTP::cookie insert.
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
