+
95
-

回答

确认 Nginx 配置文件是否正确配置了 woff 和 ttf 文件的 MIME 类型,例如:

location ~* \.(woff|ttf)$ {
root /path/to/your/fonts;
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods GET;
add_header Access-Control-Allow-Headers Origin, X-Requested-With, Content-Type, Accept;
add_header Content-Type application/font;
add_header Cache-Control public;

}

网友回复

我知道答案,我要回答