CDN webfont error

#1
The fonts are:
Code:
https://d2qf5iffjdpwf8.cloudfront.net/wp-content/themes/sahifa/fonts/BebasNeue/BebasNeue-webfont.woff
https://d2qf5iffjdpwf8.cloudfront.net/wp-content/themes/sahifa/fonts/fontawesome/fontawesome-webfont.woff?v=4.6.3
When loading via CDN link, there is no issue:
Code:
https://d2qf5iffjdpwf8.cloudfront.net/
a.jpg
Use with the plugin, it return error:
Code:
https://www.digitalcashpalace.com/
b.jpg
Is there something wrong please?

Thanks.
 
Last edited by a moderator:

hai

Well-Known Member
#2
This is CORS issue.

(index):1 Access to Font at
Code:
https://d2qf5iffjdpwf8.cloudfront.net/wp-content/themes/sahifa/fonts/BebasNeue/BebasNeue-webfont.woff
from origin
Code:
https://www.digitalcashpalace.com
has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin
Code:
https://www.digitalcashpalace.com
is therefore not allowed access.

Can you try to add this manually into your .htaccess to see if it can be fixed temporarily?
After litespeed block, add this:

Code:
<FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
 
Last edited by a moderator:
#3
I added those rules, clear the cache and also clear CDN cache. It's still error at my end but pingdom test result no longer show error. I'll wait for sometime then!
 

hai

Well-Known Member
#4
Looks like BebasNeue-webfont.woff and other fonts have no CORS issues anymore. Only webfont.woff and webfont.woff2 still have this issue as I just checked.
 
Top