ElasticSearch Access-Control-Allow-Headers header is not present
You should add following signs to your elasticsearch.yml
:
http.cors.allow-methods : OPTIONS, HEAD, GET, POST, PUT, DELETEhttp.cors.allow-headers : Authorization, X-Requested-With,X-Auth-Token,Content-Type, Content-Length
and then restart the es, enjoy!
I finally solved the problem with these config lines in elasticsearch.yml
:
http.cors.enabled: truehttp.cors.allow-origin: /https?:\/\/(localhost)?(127.0.0.1)?(:[0-9]+)?/http.cors.allow-methods : OPTIONS, HEAD, GET, POST, PUT, DELETEhttp.cors.allow-headers : Authorization, X-Requested-With,X-Auth-Token,Content-Type, Content-Length