如何添加的crossdomain.xml的子目录 [英] How to add crossdomain.xml in sub directory

查看:173
本文介绍了如何添加的crossdomain.xml的子目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

借助规范跨域策略文件说,你可以把该的crossdomain.xml 通过使用 X-允许交叉域策略头的根目录以外的文件。究竟如何一去这样做?我想提出一个的crossdomain.xml 文件中的一个子目录(我没有访问根)。这是规范

  

在客户端需要一个策略文件,他们看的根在默认情况下。一个   域应始终托管主策略文件强制执行其预期的元策略。如果客户端被指示加载上述主装置以外的策略文件   政策文件,客户端还必须检查主策略文件   确保在主策略文件中定义的元策略允许使用   最初请求的策略文件。

     

如果没有主策略文件,这是留给客户端   执行默认行为。相反,在主依靠完全的   对于元策略的策略文件,用户还可以决定以检查   在文件 X-允许交叉域策略头指定   元策略。除了在可接受的值   允许交叉领域的政策,这个头也可以使用值   无 - 本 - 响应,以指示当前文档不应该   用作尽管其他标题或内容的策略文件。非主策略文件只能在自己的授权访问数据   目录或子目录。

解决方案

我猜你想使用的crossdomain.xml的Flash客户端? 事实是,默认情况下,Flash客户端总是试图找到根的文件。作为规范的状态,一切必须在客户端进行设置。我不是一个闪光codeR - 你应该标记这个问题与闪或任何其他客户端是$ C $光盘

The spec for cross domain policy files says that you can put a the crossdomain.xml file outside the root through the use of a X-Permitted-Cross-Domain-Policies header. How exactly does one go about doing that? I want to put a crossdomain.xml file in a sub directory (I don't have access to the root). This is from page 11 of the spec:

When clients require a policy file, they look at the root by default. A domain should always host a master policy file to enforce its intended meta-policy. If a client is instructed to load a policy file other than the master policy file, the client must still check the master policy file to ensure that the meta-policy defined by the master policy file permits the use of the originally requested policy file.

Without a master policy file, it is left to the client to enforce the default behavior. Instead of relying entirely on master policy files for meta-policies, clients may also decide to check for a X-Permitted-Cross-Domain-Policies header in documents to specify a meta-policy. In addition to the values acceptable in permitted-cross-domain-policies, this header may also use a value of none-this-response to indicate that the current document should not be used as a policy file despite other headers or its content. Non-master policy files can only grant access to data within their own directory or subdirectories.

解决方案

I'm guessing you want to use the crossdomain.xml for a Flash client? fact is, by default a flash client always tries to find that file in the root. as the specs state, everything else must be set in the client. I'm not a flash coder - you should tag this question with "flash" or whatever else the client is coded in.

这篇关于如何添加的crossdomain.xml的子目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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