elasticsearch-head

地址:https://github.com/mobz/elasticsearch-head

git clone git://github.com/mobz/elasticsearch-head.git
cd elasticsearch-head

修改 elasticsearch-head-master\Gruntfile.js
在server裏面加上
hostname: '*'

在 proxy裏面的index.js 修改 localhost

npm install
npm run start
後臺啓動
npm run start &
在elasticsearch中啓用CORS
如果不作爲elasticsearch的插件運行(甚至不能從版本5運行),則必須在elasticsearch中啓用CORS,否則您的瀏覽器將拒絕看似不安全的請求。

在elasticsearch配置中;

加 http.cors.enabled: true
http.cors.allow-origin: "*"
您還必須設置,http.cors.allow-origin因爲默認情況下不允許原點。http.cors.allow-origin: "*"是有效值,但它被視爲安全風險,因爲您的羣集可以從任何地方開放交叉。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章