1. 确保 http://localhost:9200 打开能看到 ES的版本信息

 

{
  "name" : "ANDEQUAN-PC",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "ckRycpKjRYm1jftaJUGH0Q",
  "version" : {
    "number" : "7.1.0",
    "build_flavor" : "default",
    "build_type" : "zip",
    "build_hash" : "606a173",
    "build_date" : "2019-05-16T00:43:15.323135Z",
    "build_snapshot" : false,
    "lucene_version" : "8.0.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}


2.elasticsearch的elasticsearch.yml 配置文件中添加:

http.cors.enabled: true 
http.cors.allow-origin: "*"

重新启动elasticsearch
Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐