Using your web font via custom CSS

Using your web font via custom CSS

You can display your own Web font by using a custom CSS. However, sometimes you may see errors like this. As a result, your Web font will not apply to your widget.

“Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://yourdomain.com/fonts/your_web_font.woff2. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

How to resolve the error

To resolve the error, please change your server configuration file to allow CORS request from “https://feed.mikle.com”. If your site is HTTP, please allow “http://feed.mikle.com”.

How to change the configuration? It depends on the web server you are using and your security policy. Please refer to the following examples of the server.

Nginx:
https://enable-cors.org/server_nginx.html

Apache:
https://enable-cors.org/server_apache.html

December 15, 2017 6:45 am