server-configs-nginx/h5bp/location/cross-origin_web_fonts.conf

20 lines
666 B
Nginx Configuration File
Raw Normal View History

# ----------------------------------------------------------------------
# | Cross-origin web fonts |
# ----------------------------------------------------------------------
# Allow cross-origin access to web fonts.
#
# https://developers.google.com/fonts/docs/troubleshooting
location ~* \.(?:eot|otf|tt[cf]|woff2?)$ {
include h5bp/cross-origin/requests.conf;
# Also, set cache rules for web fonts.
#
# https://nginx.org/en/docs/http/ngx_http_core_module.html#location
# https://github.com/h5bp/server-configs/issues/85
# https://github.com/h5bp/server-configs/issues/86
access_log off;
expires 1M;
}