ElasticSearch-head 操作时,报 406错误码


 

查询时报错{"error":"Content-Type header [application/x-www-form-urlencoded] is not supported","status":406}

 

 

 

解决方法:

1、进入head安装目录;docker exec -it 名称 bash

2、打开文件夹_site,cd _site/

3、编辑vendor.js  共有两处

  ①. 6886行   contentType: "application/x-www-form-urlencoded

    改成

      contentType: "application/json;charset=UTF-8"

  ②. 7574行 var inspectData = s.contentType === "application/x-www-form-urlencoded" &&

    改成

   var inspectData = s.contentType === "application/json;charset=UTF-8" &&
4、退出容器exit  然后重启

5、重新查询,可以查出数据


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM