需要跨域时,在elasticsearch.yml末尾添加配置
http.cors.enabled: true http.cors.allow-origin: "*"
如果在使用elasticsearch-head还是存在跨域问题,则追加配置
http.cors.allow-methods: OPTIONS,HEAD,GET,POST,PUT,DELETE http.cors.allow-headers: Content-Type,Accept,Authorization,x-requested-with



