# X-Forwarded-For docs

**URL:** https://discuss.pomerium.com/t/x-forwarded-for-docs/307
**Category:** Support
**Created:** [September 14, 2023, 4:14am UTC](https://discuss.pomerium.com/t/x-forwarded-for-docs/307 "2023-09-14T04:14:46Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Dennis](https://avatars.discourse-cdn.com/v4/letter/d/e56c9b/32.png) [@Dennis](https://discuss.pomerium.com/u/Dennis)
#### Post date: [September 14, 2023, 4:14am UTC](https://discuss.pomerium.com/t/x-forwarded-for-docs/307/1 "2023-09-14T04:14:46Z")

</div>

I want to know why it is stated `Do not append proxy IP addresses to the x-forwarded-for HTTP header.` in the docs?

Why we should not append proxy ip address to x-forwarded-for? (i assume the proxy address refers to pomerium’s envoy ip address right?) I have read the envoy docs but do not really get it , because envoy does not state we should not append it.

Also, What is the default setting for `use_remote_address` in pomerium’s envoy?  
and i don’t see the X-Forwarded-For Header in my request header? ( client → pomerium → [httpbin.org/get](http://httpbin.org/get))?

---

<div class="post-metadata">

### Author: ![denis](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@denis](https://discuss.pomerium.com/u/denis)
#### Post date: [September 14, 2023, 8:39pm UTC](https://discuss.pomerium.com/t/x-forwarded-for-docs/307/2 "2023-09-14T20:39:29Z")

</div>

this header is reserved for proxies, you are not supposed to modify that.

[httpbin.org](http://httpbin.org) hides some headers, you need enable them [document `show_env` parameter · Issue #513 · postmanlabs/httpbin · GitHub](https://github.com/postmanlabs/httpbin/issues/513)

---

<div class="post-metadata">

### Author: ![Dennis](https://avatars.discourse-cdn.com/v4/letter/d/e56c9b/32.png) [@Dennis](https://discuss.pomerium.com/u/Dennis)
#### Post date: [September 15, 2023, 3:15am UTC](https://discuss.pomerium.com/t/x-forwarded-for-docs/307/3 "2023-09-15T03:15:21Z")

</div>

I see in the [code](https://github.com/pomerium/pomerium/blob/01672528cbe013f5ab35a11570acfafdeade0a05/config/envoyconfig/listeners.go#L300) that the `use_remote_address` is true  
And `skip_xff_append` is false by default in pomerium.

Which means that according to [envoy docs](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_conn_man/headers.html#x-forwarded-for) with use\_remote\_address :true ; skip\_xff\_append:false this will append the x-forwarded-for by default.

```auto
Envoy will only append to XFF if the use_remote_address HTTP connection manager option is set to true and the skip_xff_append is set false. This means that if use_remote_address is false (which is the default) or skip_xff_append is true, the connection manager operates in a transparent mode where it does not modify XFF.

```

If the docs state `Do not append proxy IP addresses to the x-forwarded-for HTTP header. `  
Why so the default values are appending the xff ? So we should always set skip\_xff\_append to true?

---

<div class="post-metadata">

### Author: ![kjenkins](https://avatars.discourse-cdn.com/v4/letter/k/54ee81/32.png) [@kjenkins](https://discuss.pomerium.com/u/kjenkins)
#### Post date: [September 15, 2023, 4:18pm UTC](https://discuss.pomerium.com/t/x-forwarded-for-docs/307/4 "2023-09-15T16:18:27Z")

</div>

Hi Dennis,

The documentation at [X-Forwarded-For HTTP Header | Pomerium](https://www.pomerium.com/docs/reference/x-forwarded-for-http-header#summary) is intended to describe the behavior of the `skip_xff_append` option. The sentence

> Do not append proxy IP addresses to the `x-forwarded-for` HTTP header.

is intended as a description of the behavior that Pomerium will exhibit when this option is set to true. It is not intended as a recommendation. The default behavior should be appropriate for most use cases, and there is no need to set `skip_xff_append` unless your use case requires it.

I’ll see if I can update the wording in the documentation to help make this clearer.

Thanks,  
Ken
