SPECIAL OFFER: Only $69 for access to everything in OSTraining for 1 year! You save $75! 
Join today and get access to 1,000's of books and videos. Learn WordPress, Drupal, Magento, Joomla and more! Sign up today!

cdn not loading fontawesome

5 years 7 months ago #123481 by photofixations
cdn not loading fontawesome was created by photofixations
Hi,

On my website: www.atlantainternetdesign.com I am using the module "EasyBlog" from StackIdeas. Currently when my cdn is turned on the "fontawesome" icons in the toolbar do not load. I am using the NoNumbers cdn plugin. If I turn off css under webfiles then the icons load. I did find a similar solution under the faqs at NoNumbers for another type of font. (see attached) But I am not quite sure how to interprete the instructions for fontawesome or exactly where to implement the changes.

As always thanks

This message has an attachment image.
Please log in or register to see it.

Please Log in to join the conversation.

5 years 7 months ago #123490 by photofixations
Replied by photofixations on topic cdn not loading fontawesome
Hi,

The issue was with my cdn and they gave me the following code to insert in the begining of my .htaccess file which solved the problem. Thought I'd post it if it will help anyone else.

#
# CORS-enabled images (@crossorigin)
#
# Send CORS headers if browsers request them; enabled by default for images.
# developer.mozilla.org/en/CORS_Enabled_Image
# blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html
# hacks.mozilla.org/2011/11/using-cors-to-load-webgl-textures-from-cross-domain-images/
# wiki.mozilla.org/Security/Reviews/crossoriginAttribute
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
# mod_headers, y u no match by Content-Type?!
<FilesMatch "\.(gif|png|jpe?g|svg|svgz|ico|webp)$">
SetEnvIf Origin ":" IS_CORS
Header set Access-Control-Allow-Origin "*" env=IS_CORS
</FilesMatch>
</IfModule>
</IfModule>
#
# Webfont access
#
# Allow access from all domains for webfonts.
# Alternatively you could only whitelist your
# subdomains like "subdomain.example.com".
<IfModule mod_headers.c>
<FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
</IfModule>

Please Log in to join the conversation.

5 years 7 months ago #123497 by Valentin
Replied by Valentin on topic cdn not loading fontawesome
Hi Bob,
I'm glad you have this sorted out.

We appreciate you shared the details, so other users may take advantage of the same solution.

Kind regards,
Valentín

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

Join today and get access to 1,000's of books and videos. Learn WordPress, Drupal, Magento, Joomla and more! Sign up today!