From c3cd0bf24a796744e946e008496d19a408b3d3ae Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Fri, 26 Mar 2021 21:25:30 -0400 Subject: [PATCH] set immutable for CSS cache header --- nginx/nginx.conf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nginx/nginx.conf b/nginx/nginx.conf index f1ae783c..2575a07d 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -229,7 +229,12 @@ http { add_header Cache-Control "public, max-age=604800"; } - location ~ "\.(css|js|mjs|svg)$" { + location ~ "\.css$" { + include snippets/security-headers.conf; + add_header Cache-Control "public, max-age=31536000, immutable"; + } + + location ~ "\.(js|mjs|svg)$" { include snippets/security-headers.conf; add_header Cache-Control "public, max-age=31536000"; }