nfl-elastic-aggregations
nfl-elastic-aggregations copied to clipboard
Access-Control-Allow-Origin
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?
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