Cross-Domain Policy File explanation

Source: Internet
Author: User

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>





Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.