I setup a standalone elasticsearch using docker image(elasticsearch:alpine)
Try to enable cors setting in /usr/share/elasticsearch/config/elasticsearch.yml
CORS is a two-way process. The client sends particular CORS-related headers, and then the server responds appropriately. Unless you tell curl to set those request headers, you won't see anything in the response.
If you add the Origin header to your request, you should see what you're looking for:
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.