gpt4 book ai didi

jquery - 飞行前响应中的Access-Control-Allow-Headers不允许请求 header 字段kbn-version

转载 作者:行者123 更新时间:2023-12-02 23:23:40 24 4
gpt4 key购买 nike

我在yml文件中设置了Kibana配置详细信息,如下所示,

server.cors: true
server.cors.origin: "*"
server.cors.credentials: true
server.cors.methods: "GET, POST, PUT, DELETE, OPTIONS, HEAD"
server.cors.headers: "Origin, X-Requested-With, Content-Type, Accept, Engaged-Auth-Token"

但是我的jQuery Ajax调用仍然收到错误“预检响应中Access-Control-Allow-Headers不允许请求 header 字段kbn-version”。感谢您在解决此问题方面的帮助。

最佳答案

感谢@slidehowbarker,对我来说,我在Elasticsearch中进行了配置。

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: "kbn-version, Origin, X-Requested-With, Content-Type, Accept, Engaged-Auth-Token"

关于jquery - 飞行前响应中的Access-Control-Allow-Headers不允许请求 header 字段kbn-version,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45629247/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com