问题描述
我在Python Gae SDK中创建了一个flex应用程序,我得到了错误2048,所以我把一个crossdomain.xml放在静态文件夹下。
crossdomain.xml如下:
<?xml version =1.0?>
<!DOCTYPE跨域策略SYSTEM/xml/dtds/cross-domain-policy.dtd\">
<跨网域政策>
< allow-http-request-headers-from domain =*headers =*secure =false/>
< / cross-domain-policy>
而且,我在app.yaml中添加以下内容:
- url:/crossdomain.xml
static_files:static / crossdomain.xml
上传:static / crossdomain.xml
然而,我仍然得到错误2048.因此,我想知道是什么我需要配置或错过在我的情况以及如何解决这个错误。
请指教。感谢。
我没有使用Flash的crossdomain.xml,但我有Unity3d。我已经得到它的工作,你有什么看起来是正确的。
您是否访问了yoursite.com/crossdomain.xml以确保它在浏览器中可见?
/ p>如果Flash真的很挑剔,那么可能需要指定一个mimetype(text / xml或application / xml)
- url:/crossdomain.xml
mime_type:text / xml
static_files:static / crossdomain.xml $ b $上传:static / crossdomain.xml
您也可以在验证器中检查crossdomain.xml,以确保不会丢失/>或类似的东西。
另外,请查看。他们的限制最少的版本应该可以在任何网站上运行:
<?xml version =1.0?>
<!DOCTYPE跨域策略系统http://www.adobe.com/xml/dtds/cross-domain-policy.dtd\">
<跨网域政策>
- >
< allow-http-request-headers-from domain =*headers =*secure =false/>
如果您使用allow-access-from domain =*
托管一个crossdomain.xml文件,并且不理解这里描述的所有要点,
有一个令人讨厌的安全漏洞。 〜simon willison
- >
< / cross-domain-policy>
I have created a flex application in the Python Gae sdk and I got the error 2048, so I put a crossdomain.xml under the static folder.The crossdomain.xml is following:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="*" to-ports="*" secure="false"/>
<allow-http-request-headers-from domain="*" headers="*" secure="false"/>
</cross-domain-policy>
And, I add the following in the app.yaml:
- url: /crossdomain.xml
static_files: static/crossdomain.xml
upload: static/crossdomain.xml
However, I still got the error 2048. Therefore, I would like to know is anything I need to configure or miss in my case and how to fix the error.
Please advice. Thanks.
I haven't used crossdomain.xml with Flash, but I have with Unity3d. I've gotten it to work, and what you have looks correct.
Have you visited yoursite.com/crossdomain.xml to make sure it's visible in a browser?
If Flash is really picky you might need to specify a mimetype (text/xml or application/xml)
- url: /crossdomain.xml
mime_type: text/xml
static_files: static/crossdomain.xml
upload: static/crossdomain.xml
You also might want to check you crossdomain.xml in a validator to make sure you're not missing a /> or something like that.
Also, check out html5boilerplate's crossdomain.xml. Their least restrictive version should work on any site:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<!-- Read this: www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html -->
<!-- Most restrictive policy: -->
<!--
<site-control permitted-cross-domain-policies="none"/>
-->
<!-- Least restrictive policy: -->
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="*" to-ports="*" secure="false"/>
<allow-http-request-headers-from domain="*" headers="*" secure="false"/>
<!--
If you host a crossdomain.xml file with allow-access-from domain="*"
and don’t understand all of the points described here, you probably
have a nasty security vulnerability. ~ simon willison
-->
</cross-domain-policy>
这篇关于如何在Python Google App Engine Sdk中配置flex crossdomain.xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!