Elasticsearch配置head报错问题

Elasticsearch5以后就不能用安装的方式启动head插件了,所以必须通过单独的程序去启动,安装的时候遇到head程序报错如下:

Failed to load http://10.4.109.81:9200/_all: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://10.4.109.81:9100' is therefore not allowed access. The response had HTTP status code 403.

解决办法是在elasticsearch.yml里面增加:

http.cors.enabled : true
http.cors.allow-origin : "*"

即可解决问题。

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

推荐阅读更多精彩内容