3

我可以在我的服务器日志中看到 [mydomain]/crossdomain.xml 的一些 http 404

我想知道是否因此添加此文件并将其配置为具有最严格的策略。即:(取自 html 5 样板文件)

<?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>

就等于没有吗?

我发现与跨域误导有关的 http 404 错误,因此我想摆脱它们,以便更有效地识别真实错误。

4

1 回答 1

0

不完全的。该规范指出:

换句话说,根跨域策略不包含 allow-access-from 指令或 HTTP 标头。“无”的元策略阻止使用可能存在的任何其他策略,即使开发人员包含它们。在元策略为“none”的根跨域策略文件中拥有 allow-access-from 或标头策略是无效的。在无效策略同时具有“无”设置和其他指令的情况下,“无”优先且站点上不允许任何权限。

所以,我认为最严格的技术是使用“无”。

于 2012-06-03T08:49:57.193 回答