Remove cache-control public and better handle svgz files

Fixes: #86

Fixes: #134
This commit is contained in:
Matthew Miller 2016-03-21 10:07:58 -04:00 committed by Andy Dawson
parent 351e70671e
commit d2f4e5c68f
1 changed files with 9 additions and 1 deletions

View File

@ -19,11 +19,19 @@ location ~* \.(?:rss|atom)$ {
}
# Media: images, icons, video, audio, HTC
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|mp4|ogg|ogv|webm|htc)$ {
access_log off;
add_header Cache-Control "max-age=2592000";
}
# Media: svgz files are already compressed.
location ~* \.svgz$ {
expires 1M;
access_log off;
gzip off;
add_header Cache-Control "max-age=2592000";
}
# CSS and Javascript
location ~* \.(?:css|js)$ {
add_header Cache-Control "max-age=31536000";