0
点赞
收藏
分享

微信扫一扫

elasticsearch-head 抛出异常Cype header [application/x-www-form-urlencoded] is not supported


使用的 elasticsearch-head docker 可以连接 es 但是查看索引信息返回

{“error”:“Content-Type header [application/x-www-form-urlencoded] is not supported”,“status”:406}

修改办法:
1.登录到容器中

docker exec -it  编号 bash
cd /usr/src/app/_site

#需要对vendor.js 进行修改,发现没有 vim 
#需要对 vim 进行安装,可以执行以下命令:

apt-get update
apt-get install vim

vim vendor.js
/application

#将搜索到的
contentType: "application/x-www-form-urlencoded" 
#改为
contentType: "application/json"

然后保存,刷新一下界面直接使用。无需重启

elasticsearch-head 抛出异常Cype header [application/x-www-form-urlencoded] is not supported_vim

举报

相关推荐

0 条评论