Forum Discussion
keith_varga_107
Nimbostratus
Jun 07, 2012irule for http vs https requests
DevCentral Team,
Here is our current irule:
when HTTP_REQUEST {
HTTP::header insert "X_CLIENT_IP" [IP::client_addr]
HTTP::header insert "X-Forwarded-For" [IP...
hoolio
Cirrostratus
Jun 08, 2012Hi Keith,
Did you have a question about the iRule you posted?
You could modify it to use a switch statement to avoid running string tolower on the URI multiple times:
when HTTP_REQUEST {
HTTP::header insert "X_CLIENT_IP" [IP::client_addr]
HTTP::header insert "X-Forwarded-For" [IP::client_addr]
switch -glob [string tolower [HTTP::uri]] {
"*/pmcserver/checkforwork*" {
pool pm2_qa_web
}
"*pmcserver*" {
pool pm2_qa_pmcserver
}
"/partner*" {
pool pm2_qa_soap
}
default {
pool pm2_qa_web
}
}
}
AaronRecent 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