【问题标题】:Openfire Rest API plugin field AuthorizationOpenfire Rest API 插件字段授权
【发布时间】: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


【解决方案1】:

你需要使用路径:https://myopenfire.org.ua:9090/plugins/restapi/v1/chatrooms

(它使用网络接口端口)并且它没有绑定到“http-bind”

【讨论】:

  • S 访问从源 '169.254.129.32:3000' 在 '192.168.5.237:9090/plugins/restapi/v1/users/test1' 获取已被 CORS 策略阻止:对预检请求的响应未通过访问控制检查:否 'Access-Control-请求的资源上存在 Allow-Origin' 标头。如果不透明的响应满足您的需求,请将请求的模式设置为“no-cors”以获取禁用 CORS 的资源。
  • 取最新的rest api插件。过去我们在使用 CORS 时遇到了一些问题
  • 我下载并替换了 1.3.7 版本的 restAPI.jar。但同样的问题
  • 我已将插件降级到 v 1.3.1。并得到相同的严重错误。
猜你喜欢
  • 2016-02-09
  • 1970-01-01
  • 2019-01-16
  • 2019-07-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多