# Is the "Client-IP" header going to be supported long term?

**URL:** <https://answers.netlify.com/t/is-the-client-ip-header-going-to-be-supported-long-term/11203>\
**Category:** Support\
**Tags:** headers, proxying\
**Created:** [March 26, 2020, 3:21pm UTC](https://answers.netlify.com/t/is-the-client-ip-header-going-to-be-supported-long-term/11203 "2020-03-26T15:21:19Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Supermathie](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/supermathie/32/8318_2.png) [@Supermathie](https://answers.netlify.com/u/Supermathie)\
**Post date:** [March 26, 2020, 3:21pm UTC](https://answers.netlify.com/t/is-the-client-ip-header-going-to-be-supported-long-term/11203/1 "2020-03-26T15:21:19Z")

</div>

I’ve [seen](https://answers.netlify.com/t/x-forwarded-host/7104/3) that `X-Forwarded-For` is not supported by Netlify and you recommend alternative headers.

Specifically, looks like you provide three options:

```auto
X-Nf-Client-Connection-Ip
X-Bb-Ip
Client-Ip

```

We would like to use the `client-ip` header for our logging - is this a header you are supporting long term?

---

<div class="post-metadata">

**Author:** ![fool](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/fool/32/37_2.png) [@fool](https://answers.netlify.com/u/fool)\
**Post date:** [March 26, 2020, 7:50pm UTC](https://answers.netlify.com/t/is-the-client-ip-header-going-to-be-supported-long-term/11203/2 "2020-03-26T19:50:25Z")

</div>

Hi there,

We make no guarantees on anything except “X-Nf-Client-Connection-Ip”. Please use that one instead!

---

<div class="post-metadata">

**Author:** ![Supermathie](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/supermathie/32/8318_2.png) [@Supermathie](https://answers.netlify.com/u/Supermathie)\
**Post date:** [October 16, 2020, 4:26pm UTC](https://answers.netlify.com/t/is-the-client-ip-header-going-to-be-supported-long-term/11203/3 "2020-10-16T16:26:13Z")

</div>

Many other companies seem to have settled on `true-client-ip` as a header for this purpose - is this something you could support?

---

<div class="post-metadata">

**Author:** ![fool](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/fool/32/37_2.png) [@fool](https://answers.netlify.com/u/fool)\
**Post date:** [October 16, 2020, 4:47pm UTC](https://answers.netlify.com/t/is-the-client-ip-header-going-to-be-supported-long-term/11203/4 "2020-10-16T16:47:29Z")

</div>

Nope! We’ll be using the header names we have in place already 🙂

---

<div class="post-metadata">

**Author:** ![Supermathie](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/supermathie/32/8318_2.png) [@Supermathie](https://answers.netlify.com/u/Supermathie)\
**Post date:** [October 16, 2020, 6:08pm UTC](https://answers.netlify.com/t/is-the-client-ip-header-going-to-be-supported-long-term/11203/5 "2020-10-16T18:08:09Z")

</div>

I get that, but it makes things very difficult for our (Netlify and Discourse) common customers.

We need to tell customers with proxies in front of their Discourse installation to scrub certain headers from requests before they forward them to us and we _really_ don’t want that list to grow.

Would you consider adding support for the industry standard `x-forwarded-for` or the sort-of-emerging `true-client-ip`?

EDIT: we’ve adjusted how we’re doing things such that this is not a huge problem for us

---

<div class="post-metadata">

**Author:** ![fool](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/fool/32/37_2.png) [@fool](https://answers.netlify.com/u/fool)\
**Post date:** [October 16, 2020, 7:24pm UTC](https://answers.netlify.com/t/is-the-client-ip-header-going-to-be-supported-long-term/11203/6 "2020-10-16T19:24:27Z")

</div>

Great to hear! We use `x-forwarded-for` internally, so no can do on that one. Could you link me to the details on the “emerging standard” you reference? Our team would be happy to take a look at it, I just hadn’t heard of it before so not sure where you’ve seen it 🙂

---

<div class="post-metadata">

**Author:** ![cfjedimaster](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/cfjedimaster/32/218_2.png) [@cfjedimaster](https://answers.netlify.com/u/cfjedimaster)\
**Post date:** [February 18, 2021, 3:35pm UTC](https://answers.netlify.com/t/is-the-client-ip-header-going-to-be-supported-long-term/11203/7 "2021-02-18T15:35:12Z")

</div>

This type of detail would be really useful in the main Functions section of the docs. Can it be added please?

---

<div class="post-metadata">

**Author:** ![perry](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/perry/32/16_2.png) [@perry](https://answers.netlify.com/u/perry)\
**Post date:** [February 18, 2021, 7:06pm UTC](https://answers.netlify.com/t/is-the-client-ip-header-going-to-be-supported-long-term/11203/8 "2021-02-18T19:06:04Z")

</div>

Hi there, could you be a bit more specific on which type of detail you feel should be added? thanks!

---

<div class="post-metadata">

**Author:** ![cfjedimaster](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/cfjedimaster/32/218_2.png) [@cfjedimaster](https://answers.netlify.com/u/cfjedimaster)\
**Post date:** [February 18, 2021, 7:23pm UTC](https://answers.netlify.com/t/is-the-client-ip-header-going-to-be-supported-long-term/11203/9 "2021-02-18T19:23:35Z")

</div>

Specifically that X-Nf-Client-Connection-Ip is available to our code, what it represents, and so forth.

---

<div class="post-metadata">

**Author:** ![perry](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/perry/32/16_2.png) [@perry](https://answers.netlify.com/u/perry)\
**Post date:** [February 24, 2021, 8:40pm UTC](https://answers.netlify.com/t/is-the-client-ip-header-going-to-be-supported-long-term/11203/10 "2021-02-24T20:40:32Z")

</div>

thanks for clarifying, i’ll do some checking!

---

<div class="post-metadata">

**Author:** ![luke](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/luke/32/39_2.png) [@luke](https://answers.netlify.com/u/luke)\
**Post date:** [July 16, 2021, 1:47am UTC](https://answers.netlify.com/t/is-the-client-ip-header-going-to-be-supported-long-term/11203/13 "2021-07-16T01:47:45Z")

</div>

2 posts were split to a new topic: [Seeing inconsistency with `client-ip:` headers in HTTP request proxied from Netlify](https://answers.netlify.com/t/seeing-inconsistency-with-client-ip-headers-in-http-request-proxied-from-netlify/41052)

---

<div class="post-metadata">

**Author:** ![janpio](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/janpio/32/14745_2.png) [@janpio](https://answers.netlify.com/u/janpio)\
**Post date:** [March 1, 2022, 8:50am UTC](https://answers.netlify.com/t/is-the-client-ip-header-going-to-be-supported-long-term/11203/14 "2022-03-01T08:50:52Z")

</div>

Seems `event.headers['client-ip']` has started to be `undefined` some time this week. I still could not find any documentation on `X-Nf-Client-Connection-Ip` via Google, but fortunately this thread appeared.On the other hand, `event.headers['X-Nf-Client-Connection-Ip']` is also undefined for me right now, so not sure how to proceed…

Update: Seems using lowercase `event.headers['x-nf-client-connection-ip']` works for now.

Update 2: Ths smells related, although of course it should _not_ touch any of this: [Upcoming change: Stripping exposed Netlify headers from function and proxy requests](https://answers.netlify.com/t/upcoming-change-stripping-exposed-netlify-headers-from-function-and-proxy-requests/52665)

---

<div class="post-metadata">

**Author:** ![hungy-angy](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/hungy-angy/32/48243_2.png) [@hungy-angy](https://answers.netlify.com/u/hungy-angy)\
**Post date:** [April 17, 2023, 11:08pm UTC](https://answers.netlify.com/t/is-the-client-ip-header-going-to-be-supported-long-term/11203/15 "2023-04-17T23:08:19Z")

</div>

Old thread, but something I wanted to note: ‘client-ip’ works when hosting locally with `netlify dev` from the CLI. In that case, though, ’ x-nf-client-connection-ip’ does not. However, once deployed to web, ‘client-ip’ does not work and ’ x-nf-client-connection-ip’ does.

Here is my function:

```auto
import { Handler, HandlerEvent, HandlerContext } from "@netlify/functions";

const handler: Handler = async (event: HandlerEvent, context: HandlerContext) => {
    console.log(event.headers['x-nf-client-connection-ip']);

    return {
        statusCode: 200,
    };
};

export { handler };

```

Should these be made consistent?

---

<div class="post-metadata">

**Author:** ![hrishikesh](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/hrishikesh/32/74607_2.png) [@hrishikesh](https://answers.netlify.com/u/hrishikesh)\
**Post date:** [April 20, 2023, 3:25pm UTC](https://answers.netlify.com/t/is-the-client-ip-header-going-to-be-supported-long-term/11203/16 "2023-04-20T15:25:35Z")

</div>

I don’t believe CLI can have `x-nf-` headers, as those are something added by Netlify servers. Since the request is not going through Netlify servers, maybe adding that would not be ideal - but I see your complaint. Mind filing an issue on the CLI repo so the devs can decide what’s the best path forward?
