# How to add http Authorization header for elasticsearch 5.0 to haystack configuration in djnago

**URL:** <https://discuss.elastic.co/t/how-to-add-http-authorization-header-for-elasticsearch-5-0-to-haystack-configuration-in-djnago/65179>\
**Category:** Elasticsearch\
**Created:** [November 7, 2016, 7:37am UTC](https://discuss.elastic.co/t/how-to-add-http-authorization-header-for-elasticsearch-5-0-to-haystack-configuration-in-djnago/65179 "2016-11-07T07:37:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Biswajit\_Sahu](https://avatars.discourse-cdn.com/v4/letter/b/3bc359/32.png) [@Biswajit\_Sahu](https://discuss.elastic.co/u/Biswajit_Sahu)\
**Post date:** [November 7, 2016, 7:37am UTC](https://discuss.elastic.co/t/how-to-add-http-authorization-header-for-elasticsearch-5-0-to-haystack-configuration-in-djnago/65179/1 "2016-11-07T07:37:40Z")

</div>

HTTP Authorization header has been added in elasticsearch 5.0 .  
How to add this field to haystack configuaration in django ?  
Without this django isn't able to connect to elasticseach.  
And throwing **elasticsearch.exceptions.AuthenticationException: TransportError(401, u'security\_exception')** error.

---

<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:** [December 5, 2016, 7:38am UTC](https://discuss.elastic.co/t/how-to-add-http-authorization-header-for-elasticsearch-5-0-to-haystack-configuration-in-djnago/65179/2 "2016-12-05T07:38:05Z")

</div>

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