How can i load fonts from a cdn with font-face?
My code:
@font-face {
font-family: 'fontname';
src: url('https://addrestothefonts.woff') format('woff');
font-weight: normal;
font-style: normal;
}
This is not working. Tried creating a .htaccess file and adding:
# Apache config
<FilesMatch ".(eot|ttf|otf|woff)">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
# nginx config
if ($filename ~* ^.*?\.(eot)|(ttf)|(woff)$){
add_header Access-Control-Allow-Origin *;
}
But no luck there only gave me âInternal Server Errorâ.