Flash套接字策略服务器在843以上的不同端口上

时间:2013-07-24 12:55:45

标签: actionscript-3

我想在端口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)不同。

我做错了什么?

1 个答案:

答案 0 :(得分:0)

尝试添加到策略文件:

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