# NGINX # FILE: /usr/local/etc/nginx/conf.d/assets.conf # Directives to send expires headers and turn off 404 error logging for Static assets location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpe?g|gif|png|ico|zip|pdf|t?gz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|swf|bmp|txt|rtf|md)$ { access_log off; log_not_found off; expires max; # CORS headers; this is wide-open, you want to tight it up a bit add_header Cache-Control public; add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Methods GET,OPTIONS; add_header Access-Control-Allow-Headers *; } location = /robots.txt { access_log off; log_not_found off; } location = /favicon.ico { access_log off; log_not_found off; }