Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hosted website font-awesome Cross-Origin Request Blocked

i have Downloaded the FontAwesome zip from Source Site. and included the font-awesome.css file in my Website.

Ealier icons appeared perfectly, Now icons are not coming, showing the below error. may i know the reason for issue.

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://www.traderstree.com/application/views/scripts/templates/clothing-3/includes/font-awesome/fonts/fontawesome-webfont.woff?v=4.7.0. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

My Website: traderstree.com

like image 332
Mr world wide Avatar asked Dec 07 '22 20:12

Mr world wide


1 Answers

Try this in your .htaccess:

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

And make sure you enabled it with "sudo a2enmod headers" and restart your Apache.

like image 144
Polaris Avatar answered Dec 10 '22 12:12

Polaris