Elasticvue usage

Before using elasticvue you might have to enable CORS in your elasticsearch cluster.

Cluster configuration

You have to enable CORS if you do not use the browser extension, otherwise the browser will reject all requests.
Edit your config file (usually
/etc/elasticsearch/elasticsearch.yml)
and enable CORS based on how you run elasticvue:

You have to enable CORS if you use elasticvue via app.elasticvue.com.

Add the following to your elasticsearch configuration:

http.cors.enabled: true
http.cors.allow-origin: /https:\/\/app.elasticvue.com/

# and if your cluster is password protected you also have to add:
http.cors.allow-headers: X-Requested-With,Content-Type,Content-Length,Authorization

You have to enable CORS if you use elasticvue via Docker.

Add the following to your elasticsearch configuration:

http.cors.enabled: true
http.cors.allow-origin: "http://localhost:8080"

# and if your cluster is password protected you also have to add:
http.cors.allow-headers: X-Requested-With,Content-Type,Content-Length,Authorization

You have to enable CORS if you manually built elasticvue. In this case you probably know what to do, simply add the origin of the host where elasticvue is running to your elasticsearch config.

For example if it is running on http://localhost:8080:

http.cors.enabled: true
http.cors.allow-origin: "http://localhost:8080"

# and if your cluster is password protected you also have to add:
http.cors.allow-headers: X-Requested-With,Content-Type,Content-Length,Authorization

Restart your cluster when you are done and you should be able to connect.

Running elasticsearch in docker

If your elasticsearch cluster is running inside docker then you probably do not use the elasticsearch.yml config file.

In this case you can configure your cluster by passing the settings via environment variables, for example:

docker run -e "http.cors.enabled=true" \
           -e "http.cors.allow-origin=http://localhost:8080" \
           -e "discovery.type=single-node" \
           -p 9200:9200 \
           -p 9300:9300 \
           docker.elastic.co/elasticsearch/elasticsearch:7.8.0

Need help?

Please open an issue on github if you need help connecting to your cluster.