ES reachable from curl but not from Marvel/Sense

前端 未结 7 2268
天涯浪人
天涯浪人 2021-02-19 16:02

I am in the 2 hour of my Elastic Search immersion. I successfully installed ES with Marvel (with marvel.agent.enabled: false in config/elasticsearch.yml) and was ab

7条回答
  •  -上瘾入骨i
    2021-02-19 16:34

    I was having this same problem too and according to Elasticsearch's docs here: http://www.elastic.co/guide/en/marvel/current/configuration.html#cors, you have to enable CORS.

    To summarize, open the elasticsearch.yml file in the config/ folder and put this

    http.cors.enabled: true
    http.cors.allow-origin: /.*/  
    http.cors.allow-credentials: true 
    

    somewhere in there, probably the "Network And HTTP" section.

    Then, after I restarted elasticsearch, it worked fine for me in Marvel Sense.

提交回复
热议问题