ElasticSearch-head

问题:

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

解决方法:

1、进入head安装目录;若是在docker, 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.docker文件无法修改,复制到容器外 

  docker cp <containerId>:/file/path/within/container /host/path/target

posted @ 2020-01-09 16:21  清月无声  阅读(128)  评论(0)    收藏  举报