[英]ionic: No 'Access-Control-Allow-Origin' header is present on the requested resource
This is my ionic.project to allow Cross Origin Request that I found after research 这是我的ionic.project,允许在研究后找到跨源请求
{
"name": "AppName",
"app_id": "",
"proxies": [
{
"path": "/path",
"proxyUrl": "http://www.url.com/path"
}
]
}
When I run ionic serve on my cmd terminal, it launches the browser and I get this on the console 当我在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.
What could be wrong? 有什么事吗
As for me, I used this plugin to manipulate with Content-Security-Policy: 对我而言,我使用此插件来操作Content-Security-Policy:
cordova-plugin-whitelist 科尔多瓦-插件白名单
This helped me. 这对我有帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.