# How to set the X-Forwarded-For header in TraefikEE v2?

**URL:** <https://community.traefik.io/t/how-to-set-the-x-forwarded-for-header-in-traefikee-v2/5731>\
**Category:** Traefik v2\
**Tags:** kubernetes-ingress\
**Created:** [April 27, 2020, 1:48am UTC](https://community.traefik.io/t/how-to-set-the-x-forwarded-for-header-in-traefikee-v2/5731 "2020-04-27T01:48:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![deepakstriim](https://avatars.discourse-cdn.com/v4/letter/d/c37758/32.png) [@deepakstriim](https://community.traefik.io/u/deepakstriim)\
**Post date:** [April 27, 2020, 1:48am UTC](https://community.traefik.io/t/how-to-set-the-x-forwarded-for-header-in-traefikee-v2/5731/1 "2020-04-27T01:48:21Z")

</div>

We are using TraefikEE in Google Kubernetes Engines and all our ingresses are in **yaml** files. I couldn't find any relevant info in the community docs: [https://docs.traefik.io/v2.1/](https://docs.traefik.io/v2.1/) to set the **X-Forwared-For** header before sending the traffic to the downstream services. Please let me know how to do that.

Thanks !

---

<div class="post-metadata">

**Author:** ![douglasdtm](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/douglasdtm/32/2002_2.png) [@douglasdtm](https://community.traefik.io/u/douglasdtm)\
**Post date:** [April 29, 2020, 1:00pm UTC](https://community.traefik.io/t/how-to-set-the-x-forwarded-for-header-in-traefikee-v2/5731/2 "2020-04-29T13:00:20Z")

</div>

Hello Deepak,

Have you tried the `Headers` middleware? [https://docs.traefik.io/v2.1/middlewares/headers/](https://docs.traefik.io/v2.1/middlewares/headers/)

I believe that is what you are looking for adding/modifying headers before sending the request downstream.

---

<div class="post-metadata">

**Author:** ![yongzhang](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/yongzhang/32/2898_2.png) [@yongzhang](https://community.traefik.io/u/yongzhang)\
**Post date:** [December 28, 2020, 7:24am UTC](https://community.traefik.io/t/how-to-set-the-x-forwarded-for-header-in-traefikee-v2/5731/3 "2020-12-28T07:24:16Z")

</div>

I have the same question, I'm using kubernetes ingress (not CRD), I couldn't find any documents to set the headers anymore.
