Crossdomain xml和flash [英] Crossdomain xml and flash

查看:259
本文介绍了Crossdomain xml和flash的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个web服务器应用程序(基于python)。位于此服务器的Flash应用程序应连接到服务器。麻烦是在crossdomain.xml中。

 <?xml version =1.0?& 
<!DOCTYPE cross-domain-policy SYSTEMhttp://www.adobe.com/xml/dtds/cross-domain-policy.dtd\">
< cross-domain-policy>
< allow-access-from domain =*to-ports =*/>
< / cross-domain-policy>

这是这个档案(位于根目录)。



确切的问题是flash应用程序不加载此文件。有没有办法手动这样做?例如,直接从flash脚本加载它,或者在给定的端口上创建一个新的应用程序,将该文件发送到任何连接的套接字。

解决方案

< / cross-domain-policy> code> - 你只是忘了复制/粘贴最后一行?否则尝试。也可以不需要 DOCTYPE 行和 to-ports =*



我们使用这个crossdomain.xml文件,只要它在根文件夹中,它每次都为我们工作良好

 <?xml version =1.0?> 
< cross-domain-policy>
< allow-access-from domain =*/>
< / cross-domain-policy>

如果它是一个https域,并且您希望非https域上的闪存访问它,你需要将 allow-access-from 行更改为

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

最后一件值得尝试的操作是添加此行:

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

但我们从来没有使用通过http标准Flash加载/保存。 >

I have a web server application (based on python). Flash applications which are located at this server should connect to the server. The trouble is in crossdomain.xml.

<?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="*" to-ports="*"/>
</cross-domain-policy>       

Here is this file (it's in the root directory).

The exact problem is that flash-applications don't load this file. Are there any ways to do this manually? For example, load it directly from flash-script or make up a new application at given port which will send this file to any connected socket.

解决方案

you're not closing the <cross-domain-policy> tag with </cross-domain-policy> - have you just forgot to copy/paste the last line? otherwise try that. also you might not need the DOCTYPE line and the to-ports="*" either.

we use this crossdomain.xml file and as long as it's in the root folder, it's worked fine for us every time

<?xml version="1.0"?>
<cross-domain-policy>
    <allow-access-from domain="*" />
</cross-domain-policy>

if it's an https domain and you want flash on non-https domains to access it you'll need to change the allow-access-from line to this

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

one final thing worth trying is adding this line :

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

but we've never had to use that for standard flash loading/saving via http.

这篇关于Crossdomain xml和flash的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆