I am consuming Elastic Search Web-service. But I receive
XMLHttpRequest cannot load http://<IP>:9200/providers3/provider3/_search. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin "http://localhost:8085" is therefore not allowed access.
When I put below settings in 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"
then Elastic search server fails to start.
Your help would be appreciated.
Thanks.