Flash 跨域策略文件仅允许您指定 allow-domain-from 标记。
我想知道是否有一种方法可以限制访问,就像标签读取allow-domain-to一样。换句话说:
我希望我的服务器可以从任何地方访问,但前提是他们尝试请求 http://example .com/safeaccess.php 。发送到我的服务器上任何其他路径的所有请求都应受到限制,因此无法读取 http://example.com/是否
可以无需为闪存创建特殊的子域即可实现此目的回调?
Flash cross-domain policy files only allow you to specify allow-domain-from tags.
I'd like to know if there is a way to limit access as if the tag read allow-domain-to. In other words:
I want my server to be accessible from anywhere, but only if they are trying to request http://example.com/safeaccess.php . All request sent to any other path on my server should be restricted, so can't read http://example.com/somebigfile.php or http://example.com/takesminutetoprocess.php
Is it possible to achieve this without resorting to creating a special sub domain for flash callbacks?
在互联网上找到了一些答案:
http://www.richinternet.de/blog/index.cfm?entry=A094C1CA-FCA1-666F-1F19FECA73FB2C1D
"="">http://blancer.com/tutorials/30030/quick-tip-a-guide-to-cross-domain-policy-files/
基本上你需要有一个跨域策略根目录和您要访问的目录。根目录应为:
并且您还需要使用以下命令添加子目录的策略文件:
之后它应该可以顺利工作。
Found some answers on the internet:
http://www.richinternet.de/blog/index.cfm?entry=A094C1CA-FCA1-666F-1F19FECA73FB2C1D
http://blancer.com/tutorials/30030/quick-tip-a-guide-to-cross-domain-policy-files/
Basically you need to have a cross domain policy in the root and in the directory you want to access. The root one should read:
And you also need to add the subdirectory's policy file using:
Afterwards it should work smoothly.