修改elasticsearch.yml文件 vim E S H O M E ES_HOME ESHOME/config/elasticsearch.yml 增加如下字段 http.cors.enabled: true http.cors.allow-origin: "*"