远程访问 iconfont.woff 的跨域问题 Access-Control-Allow-Origin

来源:互联网 发布:淘宝买家信用怎么升级 编辑:程序博客网 时间:2024/06/04 19:35

iconfont.woff放置于服务器上,本地域名访问,
出现跨域提示:No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin …

解决方法,在location中增加add_header配置
location / {
add_header Access-Control-Allow-Origin *;
xxxx
}

阅读全文
0 0