Docker容器ElasticSearch-Head创建索引无响应406

2020-08-13 11:50:57 浏览数 (1)

ElasticSearch-Head创建索引无响应,F12查看发现406错误, 修改head的 Content-Type 设置.

代码语言:javascript复制
docker exex -it 容器id /bin/bash
root@b93fa4e29ba2:/usr/src/app# vim _site/vendor.js
1. 6886行 /contentType: "application/x-www-form-urlencoded 
    改成 contentType: "application/json;charset=UTF-8" 
2. 7574行 var inspectData = s.contentType ==`= "application/x-www-form-urlencoded" &&` 
    改成 var inspectData = s.contentType === "application/json;charset=UTF-8" &&
root@b93fa4e29ba2:/usr/src/app/_site# exit
exit
[root@localhost ~]# docker restart 容器id

0 人点赞