关于浏览器字体跨域引用问题

apache:
方法1:
<Directory "/var/www/html">
    <FilesMatch "\.(ttf|otf|eot)$">
        Header set Access-Control-Allow-Origin "*"
    </FilesMatch>
</Directory>

 

方法2:
在字体目录下写一个.htaccess
 
Header set Access-Control-Allow-Origin "*"

nginx:

location ~* \.(eot|ttf|woff)$ {
    add_header Access-Control-Allow-Origin *;
}

 

posted @ 2014-07-08 17:11  甚谁  阅读(334)  评论(0)    收藏  举报