Forum Discussion
JCMATTOS_41723
Nimbostratus
Apr 16, 2013parse cookie content company code to specific pools?
We require a special iRule to parse the cookie for company codes and direct them to a specific pool. For example each client will have an unencrypted cookie that will contain a unique company code ie...
Kevin_Stewart
Employee
Apr 16, 2013A cookie is generally a key-value pair, so is the A1, B1, C1 a key or a value?
For example, if it's a value (assuming the cookie name is "COMPANY_CODE"):
when HTTP_REQUEST {
switch { [HTTP::cookie "COMPANY_CODE"] } {
"A1" { pool POOL1 }
"B1" { pool POOL2 }
"C1" { pool POOL3 }
default { reject }
}
}
Of course this doesn't work if the cookie is passed AFTER the initial request. Do you have an out-of-band mechanism to distribute the cookies, or will the user connection initially without the cookie and hope to get one at some point?
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