修改elasticsearch安装目录中 config/elasticsearch.yml
http.cors.enabled: true
http.cors.allow-origin: “*”
修改elasticsearch-head下Gruntfile.js
connect: {
server: {
options: {
hostname: ‘0.0.0.0’,
port: 9100,
base: ‘.’,
keepalive: true
}
}
}
注意:如果是绑定ip后,在页面的连接处写ip地址。默认是localhost,可能导致连接不上。