在config/elasticsearch.yml配置文件最后添加: http.cors.enabled: true http.cors.allow-origin: /http?:\/\/192.168.3.74(:[0-9]+)?/