限制Flash跨域访问服务器上的特定位置

发布于 12-18 10:38 字数 402 浏览 1 评论 0 原文

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

好听的两个字的网名 2024-12-25 10:38:29

在互联网上找到了一些答案:

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/

基本上你需要有一个跨域策略根目录和您要访问的目录。根目录应为:

<?xml version="1.0"?>
<cross-domain-policy>
  <site-control permitted-cross-domain-policies="all"/>
</cross-domain-policy>

并且您还需要使用以下命令添加子目录的策略文件:

Security.loadPolicyFile("http://example.com/expledirecotyr/crossdomain.xml")

之后它应该可以顺利工作。

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:

<?xml version="1.0"?>
<cross-domain-policy>
  <site-control permitted-cross-domain-policies="all"/>
</cross-domain-policy>

And you also need to add the subdirectory's policy file using:

Security.loadPolicyFile("http://example.com/expledirecotyr/crossdomain.xml")

Afterwards it should work smoothly.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文