Forum Discussion
APM cookie - F5_ST
Give this a whirl:
when RULE_INIT {
user-defined: APM virtual server to forward traffic to
set static::LOCAL_APM_VIP "access-test-internal-vs"
}
when HTTP_REQUEST {
if { [HTTP::cookie exists F5_ST_ALT] } {
HTTP::cookie insert name F5_ST value [string map {"@" ","} [HTTP::cookie value F5_ST_ALT]]
HTTP::cookie remove F5_ST_ALT
}
virtual $static::LOCAL_APM_VIP
}
when HTTP_RESPONSE {
if { [HTTP::cookie exists F5_ST] } {
HTTP::cookie insert name F5_ST_ALT value [string map {"," "@"} [HTTP::cookie value F5_ST]] path [HTTP::cookie path F5_ST]
HTTP::cookie remove F5_ST
}
}
The above basically removes the F5_ST cookie from the response and creates a new version, F5_ST_ALT, with the comma mapped to an ampersand. The request event then does the same thing in reverse. The external LTM VIP has this iRule and calls the internal APM VIP by name.
virtual $static::LOCAL_APM_VIP
If you're doing client side SSL, you'll want the client SSL profile on the LTM VIP. If you're doing server side SSL, you'll want the server SSL profile on the APM VIP. Now to just change the F5_ST value, the iRule might more appropriately look like this:
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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