flash - 如何绕过Flash跨域安全

标签 flash security crossdomain.xml

当执行的 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”没有帮助。

引用:

  1. http://www.abdulqabiz.com/blog/archives/2007/03/20/flash-player-trust-flashplayertrust-on-gnulinux/

  2. Running a SWF from file:/// without having the user change their Flash Player security settings

最佳答案

使用本地服务器代理远程地址。假设您要连接到:

http://someserver.com/whatever

然后调用电话:

http://localhost/proxy/someserver.com/whatever

并让本地服务器应用程序进行实际的远程调用并代理响应。

关于flash - 如何绕过Flash跨域安全,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4079950/

相关文章:

security - IPv4 header 包含校验和但 IPv6 不包含,为什么?

Java 和 crossdomain.xml

apache-flex - SWF 不是可加载模块

apache-flex - Flex 和 crossdomain.xml

windows - Internet Explorer 忽略 flash mms.cfg 设置

flash - XFL 边缘定义中非数值的含义是什么?

php - MYSQL 确保两个 cronjobs 不处理相同的请求

flash - 将焦点传递给 Chrome 和 Safari 中的 Silverlight/Flash 对象

flash - Nodejs、Socket.io 和 Flash 中的套接字

javascript - 在同一来源/域上使用 javascript 发布数据(安全风险?