ElasticSearch-head 创建索引报错406 (Not Acceptable)
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ElasticSearch-head 创建索引报错406 (Not Acceptable)相关的知识,希望对你有一定的参考价值。
参考技术A 新建索引时,报错"error":"Content-Type header [application/x-www-form-urlencoded] is not supported","status":406解决方法:
进入head安装目录编辑vendor.js 共有两处
①. 6886行 contentType: "application/x-www-form-urlencoded
改成
contentType: "application/json;charset=UTF-8"
②. 7573行 var inspectData = s.contentType === "application/x-www-form-urlencoded" &&
改成
var inspectData = s.contentType === "application/json;charset=UTF-8" &&
以上是关于ElasticSearch-head 创建索引报错406 (Not Acceptable)的主要内容,如果未能解决你的问题,请参考以下文章
elasticsearch-head连接elasticsearch跨域问题报错Failed to load resource: net::ERR_FAILED