Forum Discussion
Paul_Brand_2026
Nimbostratus
May 10, 2017Inserting a Data Centre Cookie
Hi All,
Hoping someone can give a bit of guidance with an iRule.
I have a customer who has two data centres. With LTM active/standby pair in each.
In addition to the F5 cookie insert for session ...
Stanislas_Piro2
Cumulonimbus
May 11, 2017Hi,
You can try this irule
when RULE_INIT {
set static::local_dc "DtCnt1"
}
when HTTP_REQUEST {
set setDCcookie 0
if { [HTTP::cookie "DtCntPrstc"] ne $static::local_dc} {
set setDCcookie 1
}
}
when HTTP_RESPONSE {
if { $setDCcookie} {
HTTP::cookie remove "DtCntPrstc"
HTTP::cookie insert name DtCntPrstc value $static::local_dc
}
}
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