elasticsearch-head插件连不上elasticsearch
elasticsearch的安装目录下找到config文件夹
http.cors.enabled: true 解释:是否支持跨域,默认为false;
http.cors.allow-origin: "*" 解释:当设置允许跨域,默认为*,表示支持所有域名。
那么可以使用正则表达式。 比如只允许本地地址。/https?:\/\/localhost(:[0-9]+)?/然后重启elasticsearch
http.cors.enabled: true 解释:是否支持跨域,默认为false;
http.cors.allow-origin: "*" 解释:当设置允许跨域,默认为*,表示支持所有域名。
那么可以使用正则表达式。 比如只允许本地地址。/https?:\/\/localhost(:[0-9]+)?/然后重启elasticsearch