NGINX Fonts Not Loading CORS
Sometimes when we are developing a website, the fonts wont load correctly. This can look weird and especially so when we are using a font-based icon set like FontAwesome. If you open up your dev console and see a lot of errors talking about CORS cross origin, you need to add a new header to the server response for your font files. This article covers how to do this with NGINX.
Open up the server config for the site you’re working on
Add this location block:
location ~* "^.*?\.(eot)|(ttf)|(woff)$" { add_header Access-Control-Allow-Origin "https://mysite.com, https://www.mysite.com"; }