Well, as the error suggests, it’s blocked due to CORS because your domain is set to http://richardosborne.ca but you are opening the website with http://www.richardosborne.ca
Change your domain in Settings -> General if you want to use http://www.richardosborne.ca and set up a redirect from non-www to www.
Access to font at ‘http://richardosborne.ca/cms/wp-content/plugins/minimal-coming-soon-maintenance-mode/framework/public/css/fonts/icomoon.ttf?-3p8lp4’ from origin ‘http://www.richardosborne.ca’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
Hi, Alexandru.
Thank you for your response.
How did you find this version of the error message? All I am getting is a 403.
In my .htaccess file at the top level I have the lines:
<FilesMatch “.(eot|otf|ttf|woff|woff2)”>
Header always set Access-Control-Allow-Origin “*”
</FilesMatch>
It also has:
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ http://%1%{REQUEST_URI} [L,R=301]
My WordPress is also set for https://richardosborne.ca
What else do I need to do to unblock these fonts?
Still struggling with the same issue on a new domain: https://thecuriouswildcrafter.ca/
I am finding that the Icomoon font icons are not displaying properly. They are displaying as an empty box icon.
I have added the following code to my .htaccess file at the top directory of the website in an attempt to correct a CORS issue.
<FilesMatch “.(eot|otf|ttf|woff|woff2)”>
Header always set Access-Control-Allow-Origin “*”
</FilesMatch>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ http://%1%{REQUEST_URI} [L,R=301]
Is there a solution for this issue?
I’m not a .htaccess expert so I can’t offer you support for that.
But in my opinion you should definitely redirect instead of trying to force CORS access.
www is a subdomain technically and it’s treated as a different websites by both browsers and Search engines in some circumstances. Which is not what you want.
Creating a redirect solves all the issues.