Forum Discussion
richard_arthur_
Nimbostratus
Feb 02, 2016Use HTTP_Referer to select pool
Trying to figure out iRules here to help the app team. They want to use the HTTP_Referer to select which pool to use. Is that possible? IS the below code close to correct? Thanks.
This is...
Theo_12742
Cirrus
Feb 02, 2016One correction and one tweak. According to URI::host, it only returns the host, not the protocol associated with it, so just remove "http://" from the string:
when HTTP_REQUEST {
set referrer_host [URI::host [HTTP::header value Referer]]
if { $referrer_host eq "remotepay-pt.test.com" } {
pool REMOTEPAY_7080
} else {
pool REMOTEPAY_80
}
}
You could also remove the variable since it's only called once...
when HTTP_REQUEST {
if { [URI::host [HTTP::header value Referer]] eq "remotepay-pt.test.com" } {
pool REMOTEPAY_7080
} else {
pool REMOTEPAY_80
}
}
richard_arthur_
Nimbostratus
Feb 04, 2016Thank you. A change is being scheduled to test.
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
