elasticsearch.js client connection refused: Access-Control-Allow-Origin not recognized?

前端 未结 3 1024
长情又很酷
长情又很酷 2021-02-09 23:54

I\'ve been trying to ping a locally running elasticsearch using elasticsearch.jquery.min.js and I get a \"no living connection\" error each time.


ETA: In Chrome I

3条回答
  •  青春惊慌失措
    2021-02-10 00:15

    Put in your elasticsearch.yml configuration file, located in elasticsearch-xxx\config\elasticsearch.yml, the line below

    http.cors.enabled: true
    

    and Enable cors in your internet navigator. Restart you elasticsearch server and try again.

提交回复
热议问题