Skip to content

Instantly share code, notes, and snippets.

Created June 25, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/90d4952e7139307d543e to your computer and use it in GitHub Desktop.
Save anonymous/90d4952e7139307d543e to your computer and use it in GitHub Desktop.
Conf ngix para liberar aquivos de font e SVG via cors
# Cross domain webfont access
location ~* \.(?:ttf|ttc|otf|eot|woff|woff2|svg)$ {
add_header "Access-Control-Allow-Origin" "*";
# Also, set cache rules for webfonts.
#
# See http://wiki.nginx.org/HttpCoreModule#location
# And https://github.com/h5bp/server-configs/issues/85
# And https://github.com/h5bp/server-configs/issues/86
expires 1M;
access_log off;
add_header Cache-Control "public";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment