gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-30 01:51:14 25 4
gpt4 key购买 nike

这是我在研究后发现的允许跨源请求的 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:

cordova-plugin-whitelist

这对我有帮助。

关于android - ionic : No 'Access-Control-Allow-Origin' header is present on the requested resource,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33016165/

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