0

today I tried hosting font-awesome css files and font files on my cdn, and run into a problem. When loading the page on the google chrome console it displays the following message below.

Font from origin 'http://cdn.craftrp.co.uk' 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://craftrp.co.uk' is therefore not allowed access.

I have added the following code to a .htaccess file, I have 1 in the root and 1 in the fonts folder with the following code inside the .htaccess file

<FilesMatch ".(eot|ttf|otf|woff)">
    Header set Access-Control-Allow-Origin "*"
</FilesMatch>

I also tried the code suppleid by bootstrap, https://www.maxcdn.com/one/tutorial/htaccess-example-collection//

But still it remained to error...

Josh Hallow
  • 359
  • 3
  • 15
  • Possible duplicate: http://stackoverflow.com/questions/25577981/font-from-origin-has-been-blocked-from-loading-by-cross-origin-resource-sharing – Paul Redmond Oct 01 '15 at 13:23
  • It's not a duplicate of that, that code just shows what I have already tried, and what didn't work. – Josh Hallow Oct 01 '15 at 13:27
  • This should help. [Fontawesome cross domain font sharing](http://stackoverflow.com/questions/26125030/font-awesome-icons-not-showing-in-chrome-a-maxcdn-related-cross-origin-resource) . It worked for me. – Gokul Prasad Mar 16 '16 at 06:22

0 Answers0