下載及安裝readmenode
https://github.com/mobz/elasticsearch-headgit
安裝:github
npm installnpm
npm run startvim
訪問:http://localhost:9100/跨域
安裝報錯:app
npm ERR! Error: CERT_NOT_YET_VALID npm ERR! at SecurePair.<anonymous> (tls.js:1370:32)cors
執行:npm config set strict-ssl false運維
解決跨域問題:elasticsearch
修改vim /apps/svr/elasticsearch-6.0.1/config/elasticsearch.yml 添加如下兩句:
http.cors.enabled: true
http.cors.allow-origin: "*"