繁体   English   中英

ionic:请求的资源上不存在“ Access-Control-Allow-Origin”标头

[英]ionic: No 'Access-Control-Allow-Origin' header is present on the requested resource

这是我的ionic.project,允许在研究后找到跨源请求

{
  "name": "AppName",
  "app_id": "",
  "proxies": [
    {
      "path": "/path",
      "proxyUrl": "http://www.url.com/path"
    }
  ]
}

当我在cmd终端上运行ionic serve时,它会启动浏览器,并在控制台上显示

XMLHttpRequest cannot load http://www.url.com/Token. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8100' is therefore not allowed access.

有什么事吗

对我而言,我使用此插件来操作Content-Security-Policy:

科尔多瓦-插件白名单

这对我有帮助。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM