nfl-elastic-aggregations icon indicating copy to clipboard operation
nfl-elastic-aggregations copied to clipboard

Access-Control-Allow-Origin

Open samuraraujo opened this issue 8 years ago • 1 comments

Hi, I got the error below trying to run the example.

XMLHttpRequest cannot load http://localhost:9200/?hello=elasticsearch. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access.

Any clue how to solve it?

samuraraujo avatar Jun 15 '16 10:06 samuraraujo

try adding this to your elasticsearch.yml file, under ------network----: 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

sandi-o avatar Feb 23 '17 06:02 sandi-o