elasticsearch版本:6.7.1
打开路径 "..\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"
访问9100端口,查看连接情况。
集群健康如图所示即为正常。如果上述方案未能解决你的问题,请移步至:https://blog.csdn.net/ymd8005/article/details/70676798
网友评论