1、elasticsearch-head数据预览、基本查询、复合查询模块无法查询es文档记录
(1)解决办法
复制vendor.js
docker cp elasticsearch-head1:/usr/src/app/_site/vendor.js vendor.js
修改vendor.js
第6886行,将“contentType: "application/x-www-form-urlencoded",”修改为“contentType: "application/json;charset=UTF-8",”
第7573行,将“var inspectData = s.contentType === "application/x-www-form-urlencoded" &&”修改为“var inspectData = s.contentType === "application/json;charset=UTF-8" &&”
复制vendor.js
docker cp vendor.js elasticsearch-head1:/usr/src/app/_site/vendor.js
(2)校验
2、elasticsearch-head连接es失败
(1)解决办法
修改配置文件elasticsearch.yml,添加如下内容
http.cors.enabled: true
http.cors.allow-origin: "*"
解决跨域访问问题