# how to get X-Forwarded-For ?

**URL:** <https://community.wowza.com/t/how-to-get-x-forwarded-for/37156>\
**Category:** Wowza Developer Dojo\
**Tags:** wowza-streaming-server-java-api\
**Created:** [April 3, 2014, 8:31am UTC](https://community.wowza.com/t/how-to-get-x-forwarded-for/37156 "2014-04-03T08:31:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_Pokotilo](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@Alex\_Pokotilo](https://community.wowza.com/u/Alex_Pokotilo)\
**Post date:** [April 3, 2014, 8:31am UTC](https://community.wowza.com/t/how-to-get-x-forwarded-for/37156/1 "2014-04-03T08:31:29Z")

</div>

Our client use security reverse proxy and this is why we need ability to get X-Forwarded-For to get real client address.

there were many requests from user to support this feature.

---

<div class="post-metadata">

**Author:** ![Roger\_Littin1](https://avatars.discourse-cdn.com/v4/letter/r/c89c15/32.png) [@Roger\_Littin1](https://community.wowza.com/u/Roger_Littin1)\
**Post date:** [April 3, 2014, 11:08am UTC](https://community.wowza.com/t/how-to-get-x-forwarded-for/37156/2 "2014-04-03T11:08:53Z")

</div>

Hi,

I assume you are referring to HTTP sessions.

You can use httpStreamerSession.getHTTPHeader(String name); to get an individual header. You can also use httpStreamerSession.getHTTPHeaderNames(); to get a list of the current headers that have been set.

Roger.

---

<div class="post-metadata">

**Author:** ![Alex\_Pokotilo](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@Alex\_Pokotilo](https://community.wowza.com/u/Alex_Pokotilo)\
**Post date:** [April 4, 2014, 3:28pm UTC](https://community.wowza.com/t/how-to-get-x-forwarded-for/37156/3 "2014-04-04T15:28:26Z")

</div>

Salloum,

we don’t parse logs.

---

<div class="post-metadata">

**Author:** ![Alex\_Pokotilo](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@Alex\_Pokotilo](https://community.wowza.com/u/Alex_Pokotilo)\
**Post date:** [April 4, 2014, 3:29pm UTC](https://community.wowza.com/t/how-to-get-x-forwarded-for/37156/4 "2014-04-04T15:29:57Z")

</div>

Roger,

thanks as always. I should get it myself

---

<div class="post-metadata">

**Author:** ![Salloum\_ELDAHDAAH](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@Salloum\_ELDAHDAAH](https://community.wowza.com/u/Salloum_ELDAHDAAH)\
**Post date:** [April 3, 2014, 8:50am UTC](https://community.wowza.com/t/how-to-get-x-forwarded-for/37156/5 "2014-04-03T08:50:28Z")

</div>

i think instead of reading c-ip when x-forwarders is on you can read s-ip this will return the user ip.

Salloum.
