# Insert a spcific area in hearder rather than the true location

**URL:** <https://community.f5.com/t/insert-a-spcific-area-in-hearder-rather-than-the-true-location/16395>\
**Category:** Technical Forums\
**Tags:** irules, devops, ltm, application-delivery, geolocation\
**Created:** [April 13, 2016, 6:45am UTC](https://community.f5.com/t/insert-a-spcific-area-in-hearder-rather-than-the-true-location/16395 "2016-04-13T06:45:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Richard\_K\_20123](https://avatars.discourse-cdn.com/v4/letter/r/9fc348/32.png) [@Richard\_K\_20123](https://community.f5.com/u/Richard_K_20123)\
**Post date:** [April 13, 2016, 6:45am UTC](https://community.f5.com/t/insert-a-spcific-area-in-hearder-rather-than-the-true-location/16395/1 "2016-04-13T06:45:13Z")

</div>

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 specific geographic location. For the test purpose, the testers want me to get a specific area like New south Wales inserted into header rather tan the true location.

At this moment, the following irule is configured on the dev F5.

when HTTP\_REQUEST { HTTP::header insert X-UBET-Region [whereis [IP::client\_addr] state]

Could you please give me a right direction on this request? Thank you in advance.

---

<div class="post-metadata">

**Author:** ![iaine](https://avatars.discourse-cdn.com/v4/letter/i/f07891/32.png) [@iaine](https://community.f5.com/u/iaine)\
**Post date:** [April 14, 2016, 1:37pm UTC](https://community.f5.com/t/insert-a-spcific-area-in-hearder-rather-than-the-true-location/16395/2 "2016-04-14T13:37:57Z")

</div>

Hi

Rather than do a GEO lookup, you could just add the header using whatever value you like, so something like

```tcl
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.

```tcl
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]
}
}

```
