# Not able to get x-forwarded-for header from mozilla to API gateway

**URL:** <https://discuss.konghq.com/t/not-able-to-get-x-forwarded-for-header-from-mozilla-to-api-gateway/5623>\
**Category:** General\
**Tags:** kong-gateway\
**Created:** [February 24, 2020, 12:20pm UTC](https://discuss.konghq.com/t/not-able-to-get-x-forwarded-for-header-from-mozilla-to-api-gateway/5623 "2020-02-24T12:20:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sraravet](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/sraravet/32/1504_2.png) [@sraravet](https://discuss.konghq.com/u/sraravet)\
**Post date:** [February 24, 2020, 12:20pm UTC](https://discuss.konghq.com/t/not-able-to-get-x-forwarded-for-header-from-mozilla-to-api-gateway/5623/1 "2020-02-24T12:20:48Z")

</div>

Hi ,

i am using kong version 1.4.0. i had set up Apllication load balancer infornt of API gateway. when i access kong API gateway from mozilla with loadbalancer, i am not able to receive x-forwarded-for header.It works fine with chrome, safari & Edge.

i am using below function to receive headers  
local get\_headers = ngx.req.get\_headers

Please help me to resolve this

---

<div class="post-metadata">

**Author:** ![hbagdi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/hbagdi/32/562_2.png) [@hbagdi](https://discuss.konghq.com/u/hbagdi)\
**Post date:** [February 25, 2020, 5:42pm UTC](https://discuss.konghq.com/t/not-able-to-get-x-forwarded-for-header-from-mozilla-to-api-gateway/5623/2 "2020-02-25T17:42:43Z")

</div>

Please read [https://github.com/Kong/kubernetes-ingress-controller/blob/master/docs/guides/preserve-client-ip.md](https://github.com/Kong/kubernetes-ingress-controller/blob/master/docs/guides/preserve-client-ip.md)
