elasticsearch_head在ElasticSearch5.3.0下显示未连接的问题

需要在elasticsearch安装目录下的config/elasticsearch.yml下增加两条配置项

1
2
http.cors.enabled: true
http.cors.allow-origin: "*"

顺便提一句,如果es启用了search guard之类的认证服务,还需要开启

1
http.cors.allow-headers: "Authorization"

重启es服务