关于es跨域问题
需要跨域时,在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