# Rewrite / transform response header values?

**URL:** <https://community.traefik.io/t/rewrite-transform-response-header-values/11106>\
**Category:** Traefik v2\
**Tags:** middleware\
**Created:** [July 5, 2021, 7:25pm UTC](https://community.traefik.io/t/rewrite-transform-response-header-values/11106 "2021-07-05T19:25:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shot](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/shot/32/2312_2.png) [@shot](https://community.traefik.io/u/shot)\
**Post date:** [July 5, 2021, 7:25pm UTC](https://community.traefik.io/t/rewrite-transform-response-header-values/11106/1 "2021-07-05T19:25:06Z")

</div>

I've revised my question. What I would _really_ like to do is rewrite / transform the _value_ of any response header.

Is there a way to do that with Traefik?

---

<div class="post-metadata">

**Author:** ![shot](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/shot/32/2312_2.png) [@shot](https://community.traefik.io/u/shot)\
**Post date:** [July 5, 2021, 10:26pm UTC](https://community.traefik.io/t/rewrite-transform-response-header-values/11106/2 "2021-07-05T22:26:58Z")

</div>

Just noticed this in the docs...

![header-overwrite](https://us1.discourse-cdn.com/flex020/uploads/containo/original/2X/d/d94266c48c1cf748b1c0bb17e3300cb74854921d.png)

...which explains why I couldn't set multiple cookies using `customResponseHeaders`.

🙁

I can't find a way to set cookies in the response. Anyone know of a way?

My immediate need is simply to set the domain for cookies in the response, which seems pretty straightforward to do in nginx via the [proxy\_cookie\_domain](http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cookie_domain) directive of the `ngx_http_proxy_module` module.

Is there a way to achieve the same result with Traefik?
