From 78a7eef11925a2fe35ae5ba48d5e6efbd69e99f5 Mon Sep 17 00:00:00 2001 From: Ashley Rich Date: Fri, 14 Dec 2018 16:25:41 +0000 Subject: [PATCH] Fix Cache-Control headers overriding security headers --- global/server/static-files.conf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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; }