0

I'm trying to open a socket to my server, but it doesn't work, I'm always getting the famous

Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: http://zappy.mydomain.fr/ZappyGraphic.swf cannot load data from zappy.mydomain.fr:4242.

I have a crossdomain.xml at the root of my domain, looking like that:

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
    <allow-access-from domain="*" secure="false" />
    <site-control permitted-cross-domain-policies="master-only"/>
    <allow-http-request-headers-from domain="*" headers="*"/>
</cross-domain-policy>

And in my actionscript program, here is how I load the crossdomain policies

Security.allowDomain("*");
Security.allowInsecureDomain("*");
Security.loadPolicyFile("http://mydomain.fr/crossdomain.xml");

The server is located at mydomain.fr on the port 4242 and the swf file is located at http://zappy.mydomain.fr/index.html...

Can someone enlighten me?

4

1 回答 1

1

看起来你不能在行尾有空格,所以:

<allow-access-from domain="*" secure="false" />

必须

<allow-acces-from domain="*" secure="false"/>

感谢让我失去了我的时间!:D

而且,正如@Gio 让我注意到的那样,您必须配置一个侦听端口 843 的套接字策略服务器。nginx如果有人需要,这是我的配置:

server {
    listen 843;
    server_name mydomain.fr;
    location / {
        rewrite ^(.*)$ /crossdomain.xml;
    }

    error_page 400 /crossdomain.xml;

    location = /crossdomain.xml {
        root /usr/share/nginx/www/root;
    }
}
于 2013-07-09T03:38:10.003 回答