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
Resolved above issue. As @dadoonet suggested yml formatting, there was a space issue.
Below lines are correct, just give a single space before them and CORS issue is solved.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.