Closed zhaoyi0113 closed 6 years ago
Hi @zhaoyi0113, sorry for the late response. If you haven't got it working yet - https://github.com/appbaseio/mirage/issues/13 or https://github.com/appbaseio/mirage/issues/18 should help.
You just need to update your ES config:
http.cors.allow-origin: "*"
http.cors.enabled: true
http.cors.allow-headers : "X-Requested-With, X-Auth-Token, Content-Type, Content-Length, Authorization"
http.cors.allow-methods: "OPTIONS, HEAD, GET, POST, PUT, DELETE"
http.cors.allow-credentials: true
I can confirm that this resolves the connection issue.
A small note: It is better from a security standpoint to only allow allow specific domains to have access to the cluster in the
http.cors.allow-origin
config value.
Yeah a better options is:
http.cors.allow-origin=http://localhost:1358,http://127.0.0.1:1358
I have launched a default elasticsearch instance which is available on my local environment:
http://localhost:9200
. Open this url on my browser I get below output:but when I tried to use
mirage
to connect to this instance. I get an error dialog saying:It looks like your app name, username, password combination doesn't match. Check your url and appname and then connect it again.
My instance doesn't have any username and password. I launched it by running
elasticsearch
on terminal. Why does it complain about username and password.