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" &&
 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章