0

i hope i have chosen a right title, if im not then let me know.

I used to load font awesome fonts in my projects by calling them from external css offered by fontawesome's sites offered CDN's, and it used to work really fine and function as well as it was, but its been a day or two that im getting the error below in my console logs and fonts are not getting loaded and im seeing just a bunch of texts instead of IconFonts :

Access to font at 'https://kit-free.fontawesome.com/algo/2/webfonts/fa-solid-900-free-5.9.0.woff2' from origin 'https://erfanmola.ir' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

(actually it was this error but with other link of font ...)

I thought that it is permission error or FontAwesome is decided to suspend CDN's or ..., so i tried to re-setup FontAwesome on my website using FontAwesome's new documentations, i tried to set it up using Script tag as mentioned in its own site, but im getting the same error again and again and again.

I loaded it using the code below :

<script src="https://kit.fontawesome.com/284243d19d.js"></script>

Let me know what is wrong with this guy, it used to really work fine, i havnt changed anything ! so it's not logical to me

edit: also putting this code in htaccess didn't solve my problem :

<IfModule mod_headers.c>
  <FilesMatch "\.(ttf|ttc|otf|eot|woff|font.css|css)$">
    Header set Access-Control-Allow-Origin "*"
  </FilesMatch>
</IfModule>
Erfan Mola
  • 111
  • 1
  • 11

0 Answers0