# \[RUM\] Enrich document with HTTP request headers

**URL:** <https://discuss.elastic.co/t/rum-enrich-document-with-http-request-headers/266844>\
**Category:** APM\
**Tags:** rum\
**Created:** [March 10, 2021, 5:18pm UTC](https://discuss.elastic.co/t/rum-enrich-document-with-http-request-headers/266844 "2021-03-10T17:18:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ebuildy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ebuildy/32/6070_2.png) [@ebuildy](https://discuss.elastic.co/u/ebuildy)\
**Post date:** [March 10, 2021, 5:18pm UTC](https://discuss.elastic.co/t/rum-enrich-document-with-http-request-headers/266844/1 "2021-03-10T17:18:51Z")

</div>

**Kibana version** : 7.11.0

**Elasticsearch version** : 7.11.0

**APM Server version** : 7.11.0

**APM Agent language and version** : RUM JS library

To respect user privacy, our front load-balancers inject geoip data (X-Geo-Country ..) within HTTP request headers and replace client IP header by a hash.

As such, elasticsearch apm-geoip ingest pipeline cannot use client.ip 😔

**Is it possible to use HTTP headers from ajax call "rum-js-lib ---\> APM Server" as user context ?**

---

<div class="post-metadata">

**Author:** ![Hamidreza](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hamidreza/32/21369_2.png) [@Hamidreza](https://discuss.elastic.co/u/Hamidreza)\
**Post date:** [March 11, 2021, 8:57am UTC](https://discuss.elastic.co/t/rum-enrich-document-with-http-request-headers/266844/2 "2021-03-11T08:57:12Z")

</div>

Hi Thomas,

Thanks for reaching out.

Your use-case of protecting users' privacy makes perfect sense.  
At the moment, this is not possible with the APM server, however, I have created this [enhancement request](https://github.com/elastic/apm-server/issues/4952) to keep track of this.

Please feel free to comment on that issue.

Cheers,  
Hamid

---

<div class="post-metadata">

**Author:** ![ebuildy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ebuildy/32/6070_2.png) [@ebuildy](https://discuss.elastic.co/u/ebuildy)\
**Post date:** [March 11, 2021, 9:00am UTC](https://discuss.elastic.co/t/rum-enrich-document-with-http-request-headers/266844/3 "2021-03-11T09:00:34Z")

</div>

Hello Hamidreza, many thanks.

Yes privacy is important! Also, this make possible to inject some data that end-user cant see and modify, I am thinking about A/B testing.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 1, 2021, 5:00am UTC](https://discuss.elastic.co/t/rum-enrich-document-with-http-request-headers/266844/4 "2021-04-01T05:00:54Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
