Using custom fonts with CDN – setting CORS

Posted in: Newspaper
Post count: 2

I want to use CDNSun for our theme, but custom load failed. CDNSun give some suggest like:
How to enable CORS

Add the HTTP header Access-Control-Allow-Origin: * (allowing all domains to request the content) to all files on your origin with eot, ttf, otf and woff extension.
# Apache
<FilesMatch “.(eot|ttf|otf|woff)$”>
Header set Access-Control-Allow-Origin “*”
</FilesMatch>

# Nginx
location ~* \.(eot|ttf|otf|woff)$ {
add_header Access-Control-Allow-Origin “*”;
}
Our CDN honors all HTTP headers set on origin so in particular your custom fonts in the CDN cache will have the Access-Control-Allow-Origin: * HTTP header set and they will work in every browser.

Do Newspaper support this?

Post count: 22421

Hi,
We are not sure whether this solution will work or not, but concerning the allow origin, we always recomended this solution in the htaccess file that does the trick: https://forum.tagdiv.com/topic/strange-chinese-symbols-replaced-icons-and-arrows/
Thank you!

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.