vi nginx.conf
location ~* ^.*\.(ico|css|js|gif|jp?g|png|svg|bmp|eot|ttf|woff|otf|woff2){
add_header Access-Control-Allow-Origin “*”;
access_log off;
expires max;
# break;
}
vi mime.type
1 2 3 4 5 6 7 8 9 10 11 |
types { ..... application/x-font-ttf ttf; application/font-otf otf; application/octet-stream eot; application/font-woff woff; ..... } |