Cross-domain request configuration file Amazon AWS S3 bucket solution Lebal: Research

Cross-domain requests

It refers to the cross-domain requests access between different domain name and port.
Since the policy affects ajax homology. The default cross-domain requests are not allowed.

Amazon AWS S3 bucket and file often encounter with CloudFront can not load the plug-in font (.eot, .otf, etc.) but the problem js code can access: Access to XML Http Request at xxx from origin xxx has been blocked by CORS policy =, I check each search engine data, integrating a number of programs, listed below.


 

First, go to the S3 bucket Web interface, click "Properties", then click the "permission" and then click "Edit CORS configuration." Enter this and save it:

<CORSConfiguration>
    <CORSRule>
        <AllowedOrigin>*</AllowedOrigin>
        <AllowedMethod>GET</AllowedMethod>
    </CORSRule>
</CORSConfiguration>

Next, go to the CloudFront "distribution" of the Web interface, then click the "Distribution Settings", and then click the "act" tab. Choice behavior (multiple words each must be changed, then click "Edit."

For the "Forwarding title," its "(improved cache) no" change from "white list." The "white list titled" section. The "origin" added to this list. This tells Cloudfront consider the "origin" header in the cache.

Finally, rename the font file for good measure, so Cloudfront them as new files. I followed all the steps above, but IE still receive an error, but when I rename the font file, it can be a.

 

Reference links:

http://www.holovaty.com/writing/cors-ie-cloudfront/

https://stackoverflow.com/questions/25577981/font-from-origin-has-been-blocked-from-loading-by-cross-origin-resource-sharing

Guess you like

Origin www.cnblogs.com/radiumlrb/p/11291917.html