Crossdomain. XML is usually placed in the root folder of a domain. Flash Player detects crossdomain under this path by default. XML file, crossdomain under the root directory. XML is called the master policy file. Remember this concept and we will use it below.
The schema of crossdomain. XML is the region.
The root node of crossdomain. xml must be cross-domain-policy:
It contains three subnodes: site-control, allow-access-from, allow-http-request-headers-from
No attribute
Node introduction:
Site-control
This node defines the meta-policy of the current domain
Meta-policy determines which policy files except the master policy file in this domain can be accepted by the client.
If the policy file is not the master policy file, the site-control node will be ignored.
If you use ActionScript to specify a policy file that uses a non-Master policy file, you must first check the subnode of the Master policy file to confirm that the policy file you specified is authorized.
The permitted-Cross-domian-policies attribute of Site-control has five options: None -- no policy file is allowed, including the master policy file. Master-only does not need to be explained. By-Content-Type -- this parameter is allowed only when the Content-Type value of the HTTP header is text/X-Cross-Domain-policy. By-ftp-filename-only URLs ending with file names are allowed. All -- no need to introduce. The default value is master-only. Except for the socket policy file, the default value is all.
Allow-access-from
Allow-http-request-headers-from
========================================================== ========
Adobe does not strongly recommend the following example of crossdomain. xml files that allow access to all resources:
<? XML version = "1.0"?>
<! Doctype cross-domain-Policy System
Http://www.adobe.com/xml/dtds/cross-domain-policy.dtd>