When using Ueditor Rich text, if the client's browser is a low-version browser, such as IE7, IE8, etc., Ueditor file Upload method will be uploaded using Flash instead of HTML5, The only limiting strategy for flash across domains is the Crossdomain.xml file, which limits whether Flash can read and write data across domains and where it is allowed to read and write data across domains.
From the official Ueditor document, if you upload a file using Flash, you only need to set the following:
However, in the IE7, IE8 environment, the file is correctly requested and still cannot upload the file correctly, but the "HTTP request Error" message is reported.
In fact, the settings for Ueditor are only partially set, and some are not set, and the correct settings are as follows:
1 <?XML version= "1.0" encoding= "UTF-8"?>2 <!DOCTYPE cross-domain-policy SYSTEM "Http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">3 <Cross-domain-policy>4 <!--allow only the master policy file to be used -5 <Site-controlpermitted-cross-domain-policies= "Master-only"/>6 <!--set accessible sources, port ranges, and whether unencrypted information can be transmitted -7 <Allow-access-fromDomain= "*.baidu.com"To-ports="*"Secure= "false"/>8 <Allow-access-fromDomain= "*.baidu.cn"To-ports="*"Secure= "false"/>9 <!--set the incoming HTTP header -Ten <allow-http-request-headers-from domain= "*.baidu.com" headers = "*" /> One <Allow-http-request-headers-fromDomain= "*.baidu.cn"Headers="*" /> A </Cross-domain-policy>
As above, there should also be allow-http-request-headers-from settings, because:
- Allow-access-from: The source domain of the Flash file that can read the contents of this domain is confirmed by checking the attribute value of the node;
- Allow-http-request-headers-from: This node authorizes third-party domain flash to send user-defined HTTP headers to the domain;
The difference between the two is:
The Allow-access-from node authorizes the third domain to extract data from the domain, and the Allow-http-request-headers-from node authorizes the third-party domain to send the data to the domain as an HTTP header. [In Short, allow-access-from is to control Read permissions, and Allow-http-request-headers-from is to control write permissions in the form of HTTP headers ].
Ueditor Flash File upload-crossdomain.xml file configuration