EC2 + Cloudflare = CORS issue with font

amazon ec2amazon-web-servicescloudflarecors

I just put my first WordPress site up on a EC2 instance. And I have setup CloudFlare as my CDN. But when viewing the site I get the error below:

Font from origin 'EC2 IP' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'SITE DOMAIN' is therefore not allowed access.

I have modified the .httpd file on my EC2 instance to allow all font types. But still no luck.

What am I overlooking to get the header to have access.

Best Answer

In Wordpress you set your site address. In the current configuration it was set to the IP of the server. After changing it to the domain name it fixed my issue.