diff --git a/global/server/static-files.conf b/global/server/static-files.conf index 6f0b7f1..aeea70c 100644 --- a/global/server/static-files.conf +++ b/global/server/static-files.conf @@ -1,35 +1,35 @@ # Don't cache appcache, document html and data. location ~* \.(?:manifest|appcache|html?|xml|json)$ { - add_header Cache-Control "max-age=0"; + expires 0; } # Cache RSS and Atom feeds. location ~* \.(?:rss|atom)$ { - add_header Cache-Control "max-age=3600"; + expires 1h; } # Caches images, icons, video, audio, HTC, etc. location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|mp4|ogg|ogv|webm|htc)$ { - add_header Cache-Control "max-age=31536000"; + expires 1y; access_log off; } # Cache svgz files, but don't compress them. location ~* \.svgz$ { - add_header Cache-Control "max-age=31536000"; + expires 1y; access_log off; gzip off; } # Cache CSS and JavaScript. location ~* \.(?:css|js)$ { - add_header Cache-Control "max-age=31536000"; + expires 1y; access_log off; } # Cache WebFonts. location ~* \.(?:ttf|ttc|otf|eot|woff|woff2)$ { - add_header Cache-Control "max-age=31536000"; + expires 1y; access_log off; }