No 'Access-Control-Allow-Origin' header is present on the requested resource

(radhe) #1

Even though I have provided CORS configuration in elasticsearch.yml file as:

http.cors.enabled: true
http.cors.allow-origin: "*"

But still I'm getting this error
Failed to load http://localhost:9200/user/_search?pretty=true&size=100: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

(andy_zhou) #2

try add this
http.cors.allow-headers: Authorization

(radhe) #3

I did try this but did not work. I think my elasticsearch.yml file is not picking up. Any way I can make it use elasticsearch.yml for configuration. Looks like my elasticsearch is running on default settings irrespective of my yml file content.

(andy_zhou) #4

use kibana can connect to this es?
try use curl get this http: output log.

(radhe) #5

Yes, Kibana is connecting to Elasticsearch.
And where shoul I try curl get this http: output log.

(system) #6

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