# Is it possible to add custom Authentication headers to filebeat output being sent to logstash behind an nginx proxy?

**URL:** https://discuss.elastic.co/t/is-it-possible-to-add-custom-authentication-headers-to-filebeat-output-being-sent-to-logstash-behind-an-nginx-proxy/133959
**Category:** Beats
**Tags:** filebeat
**Created:** [May 31, 2018, 2:39am UTC](https://discuss.elastic.co/t/is-it-possible-to-add-custom-authentication-headers-to-filebeat-output-being-sent-to-logstash-behind-an-nginx-proxy/133959 "2018-05-31T02:39:06Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![alilland](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alilland/32/29729_2.png) [@alilland](https://discuss.elastic.co/u/alilland)
#### Post date: [May 31, 2018, 2:39am UTC](https://discuss.elastic.co/t/is-it-possible-to-add-custom-authentication-headers-to-filebeat-output-being-sent-to-logstash-behind-an-nginx-proxy/133959/1 "2018-05-31T02:39:06Z")

</div>

As the title says, in the Filebeat config file is it possible to define custom headers to be sent on output to Logstash?

the Filebeat documentation does not make it sound like thats an option that is available

[https://www.elastic.co/guide/en/beats/libbeat/6.2/config-file-format.html](https://www.elastic.co/guide/en/beats/libbeat/6.2/config-file-format.html)

the idea stems from this post about Elasticsearch being able to live behind nginx  
[https://www.elastic.co/blog/playing-http-tricks-nginx](https://www.elastic.co/blog/playing-http-tricks-nginx)

---

<div class="post-metadata">

### Author: ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)
#### Post date: [May 31, 2018, 2:58am UTC](https://discuss.elastic.co/t/is-it-possible-to-add-custom-authentication-headers-to-filebeat-output-being-sent-to-logstash-behind-an-nginx-proxy/133959/2 "2018-05-31T02:58:41Z")

</div>

You can add HTTP headers to the Elasticsearch output. See [output.elasticsearch.headers](https://www.elastic.co/guide/en/beats/filebeat/current/elasticsearch-output.html#_literal_headers_literal) in the docs.

But the Logstash output is different because it uses a custom protocol sent over TCP. There's nowhere in the protocol to write the headers, and even it it did you would need a custom proxy that understood the protocol. I would use TLS mutual authentication to secure the traffic to Logstash.

---

<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: [June 28, 2018, 2:58am UTC](https://discuss.elastic.co/t/is-it-possible-to-add-custom-authentication-headers-to-filebeat-output-being-sent-to-logstash-behind-an-nginx-proxy/133959/3 "2018-06-28T02:58:51Z")

</div>

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