Flash 已收到crossdomain.xml,但仍存在冲突
我在一瞬间说:Flash 已收到crossdomain.xml,但仍存在冲突,flash,socket.io,Flash,Socket.io,我在一瞬间说: Security.allowDomain("*"); socket = new FlashSocket("http://engine.WEBSITE1.com:8002"); 当我在线运行flash文件时,它会通过端口8002自动向我的node.js应用程序询问/crossdomain.xml,因此我在socket.io连接之前添加了以下代码: app.get('/*',function(req,res,next){ if(req.method==='GET'&&am
Security.allowDomain("*");
socket = new FlashSocket("http://engine.WEBSITE1.com:8002");
当我在线运行flash文件时,它会通过端口8002自动向我的node.js应用程序询问/crossdomain.xml,因此我在socket.io连接之前添加了以下代码:
app.get('/*',function(req,res,next){
if(req.method==='GET'&&req.headers.referer.indexOf('http://WEBSITE0.com/')===0&&req.url==='/crossdomain.xml'){
console.log('/crossdomain.xml');
flash=true;
var body='<cross-domain-policy><allow-access-from domain="WEBSITE0.com" to-ports="8002"/></cross-domain-policy>';
console.log(body);
res.writeHead({'Content-Type':'text/x-cross-domain-policy'});
res.write(body);
res.end();
}
else if(req.method==='GET'){console.log('???');console.dir(req);}
});
我确实看到控制台说“flash”!只是adobe对我说不。。。有什么想法吗
<cross-domain-policy><allow-access-from domain="WEBSITENAME" to-ports="*"/></cross-domain-policy>
io.sockets.on('connection',function(socket){
if(flash===true){console.log('flash');}