打开路径 “..\elasticsearch\config\ ” 下的 elasticsearch.yml 文件,在文件末尾添加如下代码:
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-methods: OPTIONS, HEAD, GET, POST, PUT, DELETE
http.cors.allow-headers: "X-Requested-With, Content-Type, Content-Length, X-User"
© 版权声明
文章版权归作者所有,未经允许请勿转载。