> For the complete documentation index, see [llms.txt](https://sevenval.gitbook.io/flat/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sevenval.gitbook.io/flat/cookbook/pass-header-field-downstream.md).

# Passing Header Fields to the Client

To add arbitrary header fields sent by the upstream system to the client response use the [`set-response-headers` action](/flat/reference/actions/set-response-headers.md) together with [pair producers](/flat/reference/templating/pair-producer.md) to copy the wanted header fields of the incoming upstream response (`$upstream/<request ID>/headers`). Here we pass `Content-Type` and `Cache-Control`:

```markup
<flow>
  <request content="httpbin">{ "url": "http://httpbin.org/cache/600" }</request>

  <set-response-headers>
  {
    {{: $upstream/httpbin/headers/content-type }}
    {{: $upstream/httpbin/headers/cache-control }}
  }
  </set-response-headers>
</flow>
```

Both expressions can be combined to

```markup
  {
    {{: $upstream/httpbin/headers/content-type | $upstream/httpbin/headers/cache-control }}
  }
```

which in turn may be shortened using [`with`](/flat/reference/templating/with.md):

```markup
  {
    {{with $upstream/httpbin/headers }} {{: content-type | cache-control }} {{end}}
  }
```
