Forum Discussion
Anish_Srivastav
Dec 16, 2010Nimbostratus
GeoIP-Quova header help
Greetings!
I want to have a custom generated HTTP header i.e. HTTP_X_FORWARDED_GEO which will hold the value "EU" for any country in the European union i.e. if [whereis [IP::client_addr] country] is FR,GB,ES etc then HTTP_X_FORWARDED_GEO = EU else it will be US or NULL value.
Can someone please help me in achieving this using an iRule or any other method which can work?
Thanks in advance
Anish
- hooleylistCirrostratusHi Anish,
when CLIENT_ACCEPTED { Look up the client IP in the GeoIP database and get the country set country [whereis [IP:client_addr] country] For EU countries, set the value to EU switch $country { "FR" - "GB" - "ES" - "IE" { For these countries, set the country to EU set country "EU" } } } when HTTP_REQUEST { Replace (or insert if not there already) the country in a custom header HTTP::header replace HTTP_X_FORWARDED_GEO value $country }
- hooleylistCirrostratusHi Anish,
- Anish_SrivastavNimbostratusThanks! Aaron
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