# Dev Tools - user-agent Header Missing

**URL:** <https://discuss.elastic.co/t/dev-tools-user-agent-header-missing/358516>\
**Category:** Kibana\
**Created:** [April 30, 2024, 7:34pm UTC](https://discuss.elastic.co/t/dev-tools-user-agent-header-missing/358516 "2024-04-30T19:34:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nickkd](https://avatars.discourse-cdn.com/v4/letter/n/958977/32.png) [@nickkd](https://discuss.elastic.co/u/nickkd)\
**Post date:** [April 30, 2024, 7:34pm UTC](https://discuss.elastic.co/t/dev-tools-user-agent-header-missing/358516/1 "2024-04-30T19:34:26Z")

</div>

Hey!

Hopefully this isn't an entirely strange question - we're running into an issue when using the console in the dev-tools of Kibana 8.11 where it looks like when Kibana sends the query to Elasticsearch, the ALB isn't seeing any user-agent in the header and so the traffic is being dropped at the ALB (due to a Web Application Firewall).

I just was curious if this is by design, or if we're missing something entirely and Kibana does set (or uses the user-agent value from the browser) when it's proxing it's call to Elasticsearch.

Everything else in Kibana works fine - Discover, Index Management, etc - it only appears that the dev console isn't sending the user-agent string. Or potentially something else is dropping it along the way, which wouldn't be a problem for Kibana itself but the logs in the ALB seem to suggest it isn't there either.

Thanks!!

Nick

---

<div class="post-metadata">

**Author:** ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)\
**Post date:** [May 6, 2024, 10:36pm UTC](https://discuss.elastic.co/t/dev-tools-user-agent-header-missing/358516/2 "2024-05-06T22:36:33Z")

</div>

@Yulia_Cech can this user get some help? Thanks!

---

<div class="post-metadata">

**Author:** ![Yulia\_Cech](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yulia_cech/32/83934_2.png) [@Yulia\_Cech](https://discuss.elastic.co/u/Yulia_Cech)\
**Post date:** [May 7, 2024, 11:51am UTC](https://discuss.elastic.co/t/dev-tools-user-agent-header-missing/358516/3 "2024-05-07T11:51:27Z")

</div>

Hey @nickkd,

I think you need to add the header you want to keep to the config `elasticsearch.requestHeadersWhitelist` ([docs](https://www.elastic.co/guide/en/kibana/current/settings.html#elasticsearch-requestHeadersWhitelist)), otherwise the headers are filtered out when sending a request via dev tools console (see this [file](https://github.com/elastic/kibana/blob/0d613e58cf153c3ac7890b742f00b24fcc55a104/src/plugins/console/server/routes/api/console/proxy/create_handler.ts#L53)).

Hope that helps!

Yulia

---

<div class="post-metadata">

**Author:** ![nickkd](https://avatars.discourse-cdn.com/v4/letter/n/958977/32.png) [@nickkd](https://discuss.elastic.co/u/nickkd)\
**Post date:** [May 7, 2024, 1:02pm UTC](https://discuss.elastic.co/t/dev-tools-user-agent-header-missing/358516/4 "2024-05-07T13:02:03Z")

</div>

👋 @Yulia_Cech

In my config file, that setting is currently commented out so I did try to uncomment it and set it this way:

```auto
# List of Kibana client-side headers to send to Elasticsearch. To send *no* client-side
# headers, set this value to [] (an empty list).
elasticsearch.requestHeadersWhitelist: ['authorization', 'user-agent']

```

Unfortunately in the journalctl logs for kibana.service, I'm seeing this as an error. It appears we cannot set `'user-agent'` as a whitelisted header?

```auto
May 07 12:59:30 ip-1-2-3-4 kibana[54570]: FATAL Error: [config validation of [elasticsearch].requestHeadersWhitelist]: types that failed validation:
May 07 12:59:30 ip-1-2-3-4 kibana[54570]: - [config validation of [elasticsearch].requestHeadersWhitelist.0]: expected value of type [string] but got [Array]
May 07 12:59:30 ip-1-2-3-4 kibana[54570]: - [config validation of [elasticsearch].requestHeadersWhitelist.1]: cannot use reserved headers: [user-agent]

```

This is on Kibana 8.11.4 of Kibana.

---

<div class="post-metadata">

**Author:** ![Yulia\_Cech](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yulia_cech/32/83934_2.png) [@Yulia\_Cech](https://discuss.elastic.co/u/Yulia_Cech)\
**Post date:** [May 10, 2024, 4:52pm UTC](https://discuss.elastic.co/t/dev-tools-user-agent-header-missing/358516/5 "2024-05-10T16:52:55Z")

</div>

Hi @nickkd, I found out that the header "user-agent" can't be added to this config and your use case might be a bug in the Console proxy implementation. I opened an [issue](https://github.com/elastic/kibana/issues/183180) to track this, please feel free to follow it for updates and if you wish, you can also comment more details on it.
