# Kibana plugin needs to add "requestHeadersWhitelist" programmatically

**URL:** https://discuss.elastic.co/t/kibana-plugin-needs-to-add-requestheaderswhitelist-programmatically/219489
**Category:** Kibana
**Created:** [February 15, 2020, 6:21pm UTC](https://discuss.elastic.co/t/kibana-plugin-needs-to-add-requestheaderswhitelist-programmatically/219489 "2020-02-15T18:21:04Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Simone\_Scarduzio](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simone_scarduzio/32/17128_2.png) [@Simone\_Scarduzio](https://discuss.elastic.co/u/Simone_Scarduzio)
#### Post date: [February 15, 2020, 6:21pm UTC](https://discuss.elastic.co/t/kibana-plugin-needs-to-add-requestheaderswhitelist-programmatically/219489/1 "2020-02-15T18:21:04Z")

</div>

Hello,

In order to work correctly and as expected, my plugin (sometimes) needs to add a few extra headers to the white list so that they will be forwarded to Elasticsearch.

Is there a way to do this in the new platform? I previously managed to do this with something along the lines of:

```auto
server.plugins.elasticsearch.getCluster('admin').getRequestHeadersWhitelist = () => myNewList
server.plugins.elasticsearch.getCluster('data').getRequestHeadersWhitelist = () => myNewList

```

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [March 14, 2020, 6:21pm UTC](https://discuss.elastic.co/t/kibana-plugin-needs-to-add-requestheaderswhitelist-programmatically/219489/2 "2020-03-14T18:21:04Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
