elasticsearch.yml に設定を追加
/etc/elasticsearch/elasticsearch.yml
http.port: 9200
http.cors.allow-origin: "*"
# http.cors.allow-origin: "http://127.0.0.1:9200"
# http.cors.allow-origin: "http://appbaseio.github.io"
http.cors.allow-methods: OPTIONS,HEAD,GET,POST,PUT,DELETE
http.cors.allow-headers: X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization
http.cors.allow-credentials: true
http.cors.enabled: true
$ /usr/share/elasticsearch/bin/elasticsearch --version
Version: 2.3.2, Build: b9e4a6a/2016-04-21T16:03:47Z, JVM: 1.7.0_99
Chromeアプリをインストール
Chromeアプリ dejaVu: https://chrome.google.com/webstore/detail/dejavu/lcanobbdndljimodckphgdmllahfcadd
参考:
dejaVuをローカルインストールしたり、Elasticsearchのプラグインとしてインストールしたんだが、どうにも最新バージョンはバグっている??ようだったので、最終的にChromeアプリで動かすことに...。
一応、9200はIPで制限しているので良いんだが..。Chromeアプリの場合に Origin って、どうなるんだ?
allow-origin: * が気持ち悪い...。