# Custom header replacement by Traefik

**URL:** <https://community.traefik.io/t/custom-header-replacement-by-traefik/1178>\
**Category:** Traefik v1\
**Tags:** service-fabric\
**Created:** [August 9, 2019, 4:54pm UTC](https://community.traefik.io/t/custom-header-replacement-by-traefik/1178 "2019-08-09T16:54:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amir](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/amir/32/505_2.png) [@Amir](https://community.traefik.io/u/Amir)\
**Post date:** [August 9, 2019, 4:54pm UTC](https://community.traefik.io/t/custom-header-replacement-by-traefik/1178/1 "2019-08-09T16:54:50Z")

</div>

I’m wondering if someone could clarify this part of the documentation for me:

[https://docs.traefik.io/basics/#custom-headers](https://docs.traefik.io/basics/#custom-headers)

```auto
If the custom header name is the same as one header name of the 
request or response, it will be replaced.

```

The way I read it is that if I try to set a custom response header in Traefik and the header already exists in the response coming back from the backend, the backend response header will prevail.

I have traefik running in Service Fabric and have a Label for adding "Cache-Control" custom header to responses. However, this replaces the header coming back from the backend app, as well.

---

<div class="post-metadata">

**Author:** ![daniel.tomcej](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/daniel.tomcej/32/262_2.png) [@daniel.tomcej](https://community.traefik.io/u/daniel.tomcej)\
**Post date:** [August 9, 2019, 5:00pm UTC](https://community.traefik.io/t/custom-header-replacement-by-traefik/1178/2 "2019-08-09T17:00:55Z")

</div>

Hello @Amir,

No, The custom headers module will _Overwrite_ headers.

If your backend sets `X-Foo`, and you have `X-Foo` set as a custom response header, then the custom header you configured will overwrite the one from the backend.

---

<div class="post-metadata">

**Author:** ![Amir](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/amir/32/505_2.png) [@Amir](https://community.traefik.io/u/Amir)\
**Post date:** [August 9, 2019, 5:40pm UTC](https://community.traefik.io/t/custom-header-replacement-by-traefik/1178/3 "2019-08-09T17:40:02Z")

</div>

Ok. Thanks.

Then I think the language in the documentation isn't quite clear.
