发现 集群健康值:未连接 关闭elasticsearch 和head
在elasticsearch的config目录下,编辑elasticsearch.yml
添加以下语句:
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"
ctrl+s保存退出
先启动elasticsearch,再启动head,进入9100端口