在开发一个多设备混合应用程序时,我遇到了Visual的问题。当我尝试对一个外部webservice进行ajax调用时,会发现一些错误。(跨域安全问题)。我的代码在部署到移动设备时运行良好。
从研究中我发现了以下几点:
- In Ripple, go to settings, and choose local, disabled, or remote (depending on your situation) on the proxy setting.
- This seemed to work for some people, but I now have a different error. (Bad Request)
- The issue with this, is that Visual Studio seems to have hard coded the path to Chrome, that it uses to open ripple.
- I therefore cant start chrome in no web security mode...
发布于 2016-02-04 14:10:20
我和Louis有同样的问题,但自从Chrome 48之后,所有的CORS扩展似乎都停止了工作。我想出了一个可供选择的解决方案,我想和大家分享一下。
此快捷方式将允许您运行Chrome没有网络安全,这允许在波普尔的CORS。通过使用快捷方式,这将不会影响您正常使用Chrome。现在为了使用Ripple
注意,刚刚被用来启动Ripple。调试需要使用Chrome的开发工具进行。
还请注意,您可以通过浏览url ://version/,再次检查Chrome是否使用快捷标志。
希望这能有所帮助!
发布于 2015-06-11 11:59:53
我通过下载和安装一个chrome扩展程序来解决这个问题,它设置了web安全设置“on”和“off”。
扩展链接:source=chrome-app-launcher-info-dialog
现在一切都好了,生活还能继续。
发布于 2016-06-02 12:04:11
作为禁用Ripple仿真器中跨域代理的附加说明.
如果您正在调用API,如,请不要忘记通过将“访问控制-允许-原产地”标志设置为"any“,从而允许外部调用API。
在我的场景中,我正在开发一个使用Azure作为后端的Ionic v1应用程序。
In web.config >>
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>https://stackoverflow.com/questions/30780183
复制相似问题