1

I am getting the following error when I am using fontawesome and the icons do not appear. Anyone know what this issue is?

Access to Font at 'http://localhost/sites/all/libraries/fontawesome/fonts/fontawesome-webfont.woff2?v=4.6.3' from origin 'http://localhost:4200' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:4200' is therefore not allowed access.

CloudSeph
  • 863
  • 4
  • 15
  • 36

1 Answers1

1

This is a CORS issue - cross-origin (domain) requests are normally blocked by browsers a security measure. An origin is different if the protocol, domain, or port is different.

If you are using .NET Core, you can by enable CORS through middleware components. There CORS alternatives for ASP.NET Web API as well.

Michael Kang
  • 52,003
  • 16
  • 103
  • 135