【问题标题】:Flash socket policy server on different port than 843与 843 不同的端口上的 Flash 套接字策略服务器
【发布时间】:2013-07-24 12:55:45
【问题描述】:

我想在闪存客户端可以连接的端口 443 上运行套接字服务器。 我不想使用端口 843 来提供套接字策略文件,因为它经常被公司防火墙关闭。

我现在正在端口 443 上从套接字服务器提供策略文件。但是,客户端似乎在我发送策略文件后关闭了连接。我收到此错误消息:

SecurityErrorEvent type="securityError" bubbles=false 
cancelable=false eventPhase=2 text="Error #2048: Security sandbox
violation: http://yy.yyy.yyyy.yyyy/path/movie.swf 
cannot load data from xx.xxx.xxx.xxx:443."]

我检查了策略文件是否发送成功:

echo -ne '<policy-file-request/>\0' | nc -v xx.xxx.xxx.xxx 443

Connection to xx.xxx.xxx.xxx 443 port [tcp/https] succeeded!
<cross-domain-policy>
   <site-control permitted-cross-domain-policies="master-only"/>
   <allow-access-from domain="*" to-ports="443" />
</cross-domain-policy>

请注意,加载 swf 的域 (yy.yyy.yyy.yyy) 与服务器地址 (xx.xxx.xxx.xxx) 不同。

我做错了什么?

【问题讨论】:

    标签: actionscript-3


    【解决方案1】:

    尝试添加到策略文件:

    <allow-http-request-headers-from domain="*" headers="*"/>
    <allow-http-request-headers-from domain="*"/>
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-12-12
    • 2011-06-08
    • 1970-01-01
    • 2011-12-21
    • 1970-01-01
    • 1970-01-01
    • 2012-03-31
    • 2012-09-22
    相关资源
    最近更新 更多