Forum Discussion
AngryCat_52750
Nimbostratus
Oct 24, 2013iRule to a variable for chosen pool member
currently in our dev and qa environments, we have an iRule that staticly replaces a header for an application.. we can do it this way coz we only have one member in a pool..
when ACCESS_ACL_ALLOWE...
AngryCat_52750
Nimbostratus
Oct 30, 2013i actually had to split the events to do the different things i needed.. i ended up with this-
when ACCESS_ACL_ALLOWED {
set user [ACCESS::session data get "session.logon.last.username"]
set uri [string range [HTTP::uri] 3 end]
HTTP::header replace "APP_USER" $user
HTTP::uri $uri
}
when HTTP_REQUEST_SEND {
if { [class match [LB::server addr] equals server-dev] } {
clientside {
HTTP::header replace Host "[class match -value [LB::server addr] equals server-dev]:9000"
}
}
}
when HTTP_RESPONSE {
if { [HTTP::header "Location"] starts_with "devserver" } {
HTTP::header replace Location [string map {"[class match -value [LB::server addr] equals server-dev]:9000" "company.domain.com/app"} [HTTP::header value Location]] }
}
Thanks for your valuable input on this..
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