You may be having the following type of error after you enable CDN on your WordPress:
Font from origin 'http://xxxxxxx.cloudfront.net' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.domain.com' is therefore not allowed access.
That's because you do not have the "Access-Control-Allow-Origin" header set by the web-server of the origin, which is Apache or Amazon S3.
You can verify this with the following command and you will not see the header:
curl -I -s -X GET -H "Origin: www.domain.com" http://xxxxxx.cloudfront.net/yyy.png
1- With S3: In order to set that header in S3, refer to the AWS Documentation.
2- Without S3:
– Edit Behaviors
– Change "Allowed HTTP Methods" to GET, HEAD, OPTIONS, PUT, POST, PATCH, DELETE
– Change "Forward Forward" headers to "Whitelist"
– Add "origin" to Whitelist headers
You need to You just need the following to be added under the Document section in your httpd.conf:
Header set Access-Control-Allow-Origin "*"
and gracefuly restart your http server:
apachectl -k graceful
Check if the header appeared with the "curl" command previously we used.
HTTP/1.0 200 OK
Date: Wed, 16 Dec 2015 22:28:00 GMT
Last-Modified: Wed, 09 Dec 2015 15:07:22 GMT
X-Cache: Miss from cloudfront
X-Cache: MISS from 22.214.171.124
X-Cache-Lookup: MISS from 126.96.36.199:3128
Via: 1.1 cxxxxxx4.cloudfront.net (CloudFront), 1.0 188.8.131.52 (squid/3.1.23)