【发布时间】:2018-07-30 05:10:54
【问题描述】:
我有问题。我正在尝试以这种方式通过 https 访问 Openfire Rest API 插件:
https://my-openfire.org.ua:7443/http-bind/plugins/restapi/v1/chatrooms
我得到错误:
无法加载https://my-openfire.org.ua:7443/http-bind/plugins/restapi/v1/chatrooms:请求标头字段授权在预检响应中被 Access-Control-Allow-Headers 不允许。
各位,我做错了什么?
【问题讨论】:
-
请帮帮我,我得到以下信息:--- 访问从源 '169.254.129.32:3000' 获取的 '192.168.5.237:9090/plugins/restapi/v1/users/test1' 已被 CORS 策略阻止:响应预检请求未通过访问控制检查:请求的资源上不存在“Access-Control-Allow-Origin”标头。如果不透明的响应满足您的需求,请将请求的模式设置为“no-cors”以获取禁用 CORS 的资源。
标签: rest http-headers openfire response-headers