Forum Discussion
Steven_Ruby_872
Nimbostratus
Jan 17, 2006more fun with jsessionid persistence
so it seems that some people in development, have decided that we shouldnt make cookies a requirement in our webapp. That means if a clients browser doesnt allow cookies the COOKIE persistence wont wo...
JRahm
Admin
Jun 26, 2006The non-cookie persistence does not work unless I have oneconnect enabled. Is this by design? My rule:
when HTTP_RESPONSE {
if { [HTTP::cookie exists "JSESSIONID"] } {
set trimID [lindex [split [HTTP::cookie "JSESSIONID"] "!" ] 0]
if { [persist lookup uie $trimID] equals "" } {
persist add uie $trimID 1800
log "added persistent entry $trimID for server [LB::server addr]"
} else { log "continued sessionID $trimID for server [LB::server addr]" }
}
}
when HTTP_REQUEST {
if { [active_members MyPool] == 0 } {
HTTP::redirect "http://[HTTP::header "X-Forwarded-Host"]/myUri.html"
}
if { [HTTP::header exists "X-Forwarded-Host"] } {
HTTP::header replace "Host" [HTTP::header "X-Forwarded-Host"]
}
if { not [HTTP::cookie exists "MyCookie"] } {
set jsess [findstr [HTTP::uri] "jsessionid" 11 "!"]
if { $jsess != "" } {
persist uie $jsess 1800
log "Used URI, value is $jsess, server [LB::server addr]"
}
} else {
log "used Cookie Insert, value is [HTTP::cookie "MyCookie"]"
}
}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