0

While loading my website, at some times icons are not displaying.

"blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource." 

Error

3
  • are you on localhost ?
    – Pawan
    Mar 29 '19 at 5:21
  • No, in my live server
    – Priya
    Mar 29 '19 at 6:09
  • This issue is occurring because you are invoking the content from the different site & the other thing is that the other site is not https:// Mar 29 '19 at 6:53
0

Please Can you open your .htaccess file and put below Code in .htaccess file.

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

it allows you to access all resources and webfonts from all domains. Hope this is helpful.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.