Hi All,
I am trying to access my elastic search cluster and pulling data using ajax calls and representing to UI.when I tried and found following properties to enable CORS ,added to elasticsearch.yml file.
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"
The above CORS setting should work and it is working on beta cluster but the same settings not working on PROD cluster we are using ES 1.5.2 version.then we got the following exception after adding CORS to PRODUCTION nodes.
"XMLHttpRequest cannot load http://<ip>:9200/index_*/_search. No 'Access-Control-Allow-Origin' header is present on the requested resource"
I added Jsonp enabling to verify the issue still it is not working please help me out to solve this problem.
http.jsonp.enable : true
Cors not working on PROD because we faced an unexpected shutdown of es nodes by OOM killer previously from that point kibana - 3.1.2 also not working as it is required CORS enabling is this be a cause?
Thanks
Phani