# CORS error on elasticsearch 6.0 running in Docker container

**URL:** <https://discuss.elastic.co/t/cors-error-on-elasticsearch-6-0-running-in-docker-container/126079>\
**Category:** Elasticsearch\
**Created:** [March 29, 2018, 11:42am UTC](https://discuss.elastic.co/t/cors-error-on-elasticsearch-6-0-running-in-docker-container/126079 "2018-03-29T11:42:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TMR](https://avatars.discourse-cdn.com/v4/letter/t/7ab992/32.png) [@TMR](https://discuss.elastic.co/u/TMR)\
**Post date:** [March 29, 2018, 11:42am UTC](https://discuss.elastic.co/t/cors-error-on-elasticsearch-6-0-running-in-docker-container/126079/1 "2018-03-29T11:42:04Z")

</div>

Hi there,

please find below my elasticsearch.yml content.

[root@2c93c5458b9b elasticsearch]# cat config/elasticsearch.yml  
cluster.name: "docker-cluster"  
network.host: 0.0.0.0

# minimum\_master\_nodes need to be explicitly set when bound on a public IP

# set to 1 to allow single node clusters

# Details: [https://github.com/elastic/elasticsearch/pull/17288](https://github.com/elastic/elasticsearch/pull/17288)

discovery.zen.minimum\_master\_nodes: 1  
xpack.license.self\_generated.type: basic  
http.cors.enabled : true  
http.cors.allow-origin : "\*"  
http.cors.allow-methods : OPTIONS, HEAD, GET, POST, PUT, DELETE  
http.cors.allow-headers : "X-Requested-With,X-Auth-Token,Content-Type, Content-Length, Authorization"  
http.cors.allow-credentials: true

Still i am getting the below error when i am trying to apply some filter in the kibana dashboard.

Please let me know if you need any further details and help me resolving the issue.

---

<div class="post-metadata">

**Author:** ![TMR](https://avatars.discourse-cdn.com/v4/letter/t/7ab992/32.png) [@TMR](https://discuss.elastic.co/u/TMR)\
**Post date:** [March 29, 2018, 11:44am UTC](https://discuss.elastic.co/t/cors-error-on-elasticsearch-6-0-running-in-docker-container/126079/2 "2018-03-29T11:44:11Z")

</div>

Error

Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

---

<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:** [April 26, 2018, 11:44am UTC](https://discuss.elastic.co/t/cors-error-on-elasticsearch-6-0-running-in-docker-container/126079/3 "2018-04-26T11:44:23Z")

</div>

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