1. 页面数据查询报406错误
1
| {"error":"Content-Type header [application/x-www-form-urlencoded] is not supported","status":406}
|
2. 解决方法:
1 2 3
| # 进入docker es-head容器 # 命令 docker exec -it 容器ID /bin/bash [root@localhost ~]# docker exec -it es-head /bin/bash
|
进入head安装目录;
cd进入_site/目录,编辑vendor.js 共有两处
1 2
| # 如果提示找不到vim方法,请参考下面的 [附: Docker容器vim安装] [root@localhost ~]# vim _site/vendor.js
|
6886行: /contentType: “application/x-www-form-urlencoded改成
1
| contentType: "application/json;charset=UTF-8"
|
7573行: var inspectData = s.contentType === “application/x-www-form-urlencoded” && 改成
1
| var inspectData = s.contentType === "application/json;charset=UTF-8" &&
|
3. 附: Docker容器vim安装
1 2 3 4
| # 更新源 [root@localhost ~]# apt-get update # 先更新,防止提示:Unable to locate package vim [root@localhost ~]# apt-get install vim
|