Font from subdomain has been blocked by Cross-Origin Resource Sharing Policy Font from subdomain has been blocked by Cross-Origin Resource Sharing Policy wordpress wordpress

Font from subdomain has been blocked by Cross-Origin Resource Sharing Policy


Try this in your .htaccess file:

# Allow font assets to be used across domains and subdomains<FilesMatch "\.(ttf|otf|eot|woff|woff2)$">  <IfModule mod_headers.c>     Header set Access-Control-Allow-Origin "*"  </IfModule></FilesMatch>

You can read more about this issue in this excellent article I found: https://expressionengine.com/learn/cross-origin-resource-sharing-cors


Try adding this to your .htaccess file:

Header add Access-Control-Allow-Origin "http://example.com"

Alternative:

Header add Access-Control-Allow-Origin "*"


You can also try this

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

More at https://davidwalsh.name/cdn-fonts