运行elasticsearch.bat出错

因为几乎没人回答这个问题,我是在某个评论中看到的

​​​​​在配置elasticsearch.yml文件时   (我是在文件最后加入的下面的代码,在:后面要加个空格,不然运行会出错o(╥﹏╥)o)

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,Content-Type,Content-Length,X-User"
 

原文地址:https://www.cnblogs.com/kingjordan/p/12027017.html