字体资源跨域配置

Nginx

location ~* \.(eot|ttf|woff|svg|otf)$ {
    add_header Access-Control-Allow-Origin *或域名;
    add_header Access-Control-Allow-Headers X-Requested-With;
    add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
}

Apache

<FilesMatch "\.(ttf|otf|eot|woff)$">
  <IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin "*或域名"
  </IfModule>
</FilesMatch>

添加新评论