当执行的 swf 已加载到本地主机上时,如何禁用 crossdomain.xml 检查?
Error #2044: Unhandled SecurityErrorEvent:. text=Error #2048: Security sandbox violation: http://localhost:2541/xxx.swf cannot load data from http://www.com/xxx.swf.
我想对本地运行的 HTML5 Web 应用程序分配完全信任。我想禁用任何跨域检查。
为什么? 某些外部服务器不为其托管的 SWF 文件提供 crossdomain.xml。 我在本地运行。我希望完全信任调试目的。我该怎么做?
我不会考虑 AIR,因为它无法在 HTML5 应用程序中使用。
将网址“http://localhost:2541/xxx.swf”添加到“C:\Users\Arvo\AppData\Roaming\Macromedia\Flash Player#Security\FlashPlayerTrust\u.cfg”没有帮助。
引用:
最佳答案
使用本地服务器代理远程地址。假设您要连接到:
http://someserver.com/whatever
然后调用电话:
http://localhost/proxy/someserver.com/whatever
并让本地服务器应用程序进行实际的远程调用并代理响应。
关于flash - 如何绕过Flash跨域安全,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4079950/