Forum Discussion
Richard_K_20123
Nimbostratus
Apr 12, 2016Insert a spcific area in hearder rather than the true location
I would like to say that I am not well at F5 iRule so I would like to get some advise from you guys.
I am testing with enabling/disabling certain feature of webpages when a user is coming from a...
iaine
Nacreous
Apr 14, 2016Hi
Rather than do a GEO lookup, you could just add the header using whatever value you like, so something like
when HTTP_REQUEST {
HTTP::header insert X-UBET-Region "My Region"
}
Or, if you wanted to be a bit more granular, you could look for some other information, such as the Dev team's source IP/VLAN and then only apply the updated header.
when HTTP_REQUEST {
if { [IP::addr [IP::client_addr] equals 10.10.10.0/24] } {
HTTP::header insert X-UBET-Region "My Region"
} else {
HTTP::header insert X-UBET-Region [whereis [IP::client_addr] state]
}
}
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