Forum Discussion
Annsar_Akhtar
Nimbostratus
Oct 23, 2013Irule query custom header
Hi Guys
We have requirement to capture the original client ip address but our hosted sites are proxied via Akamai who have an option to enable a custom header with the true client ip address. ...
Kevin_Stewart
Employee
Oct 23, 2013You're pretty close. Try something like this:
when HTTP_REQUEST {
if { [HTTP::header exists AKAMAI_HEADER] } {
if { [class match [HTTP::header AKAMAI_HEADER] equals my_data_group] } {
set state [class match -value [HTTP::header AKAMAI_HEADER] equals my_data_group]
switch $state {
"value1" { }
"value2" { }
default {
what do you do if the data group value doesn't match one of your switch states?
}
}
} else {
what do you do if the AKAMAI header doesn't match a data group entry?
}
} else {
what do you do if the AKAMAI header doesn't exist?
}
}
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