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: "*"

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容