# Elasticsearch-js angular compression - Console Error "Accept-Encoding"

**URL:** <https://discuss.elastic.co/t/elasticsearch-js-angular-compression-console-error-accept-encoding/67622>\
**Category:** Elasticsearch\
**Created:** [November 30, 2016, 1:46pm UTC](https://discuss.elastic.co/t/elasticsearch-js-angular-compression-console-error-accept-encoding/67622 "2016-11-30T13:46:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![whittssg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/whittssg/32/27669_2.png) [@whittssg](https://discuss.elastic.co/u/whittssg)\
**Post date:** [November 30, 2016, 1:46pm UTC](https://discuss.elastic.co/t/elasticsearch-js-angular-compression-console-error-accept-encoding/67622/1 "2016-11-30T13:46:48Z")

</div>

Hello,

I am using elasticsearch 5.01 along with the latest angular nrowser build. I have compressin enabled on the server and have set my client settings to:

suggestCompression: true

When i query the server from my client code i get the following error in the console:

angular.js:11945 - Refused to set unsafe header "Accept-Encoding"

The query completes and brings back the correct data but i was just wondering why this error was popping up.

Setting suggestCompression: false removes the error  
Thanks,

---

<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 28, 2016, 1:47pm UTC](https://discuss.elastic.co/t/elasticsearch-js-angular-compression-console-error-accept-encoding/67622/2 "2016-12-28T13:47:09Z")

</div>

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