第2世界
发布于 2023-06-26 / 4 阅读 / 0 评论 / 0 点赞

ElasticSearch配置跨域访问

修改elasticsearch.yml,结尾增加:

http.cors.allow-origin: "*"
http.cors.enabled: true
http.cors.allow-credentials: true
http.cors.allow-methods: OPTIONS, HEAD, GET, POST, PUT, DELETE
http.cors.allow-headers: X-Requested-With, X-Auth-Token, Content-Type, Content-Length, Authorization, Access-Control-Allow-Headers, Accept, x-elastic-client-meta


评论