ElasticSearch可视化插件elastic-search head

Centos7 下安装此插件
1、下载插件
elasticsearch-head配置包,下载地址:https://github.com/mobz/elasticsearch-head
2、安装node
自行安装
3、安装grunt
https://gruntjs.com/getting-started
我们可以通过grunt进行启动
4、解压elasticsearch-head配置包
执行grunt命令进行启动
通过9100端口进行访问即可
5、问题
安装上之后,发现连接不上es结点。
F12查看是因为:Access to XMLHttpRequest at 'http://node1:9200/' from origin 'http://server88:9100' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

解决方案:
在elasticsearch配置文件中添加:
http.cors.enabled: true
http.cors.allow-origin: "*"

你可能感兴趣的:(ElasticSearch可视化插件elastic-search head)