如题,跨域访问cdn上的ttf、woff资源失败
nginx vhost配置相关代码
server {
listen 80;
server_name www.favfor.me favfor.me;
root xxxxxxxx;
index xxx.xxx;
access_log /var/log/nginx/favf/favf.access.log;
error_log /var/log/nginx/favf/favf.error.log;
location ~* \.(eot|ttf|woff|svg|otf)$ {
add_header Access-Control-Allow-Origin 'http://favfor.me';
add_header Access-Control-Allow-Headers X-Requested-With;
add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
try_files $uri $uri/ =404;
}
location /api/ {
proxy_pass xxxxxx;
}
location / {
try_files $uri $uri/ /index.html;
}
}
链接
http://static.ifrench.cn/dist...
浏览器资源
请问为什么会资源加载失败?多谢了。